Class Filter<T>

    • Field Detail

      • web3j

        protected final Web3j web3j
      • schedule

        protected java.util.concurrent.ScheduledFuture<?> schedule
    • Constructor Detail

      • Filter

        public Filter​(Web3j web3j,
                      Callback<T> callback)
        Parameters:
        web3j -
        callback -
    • Method Detail

      • run

        public void run​(java.util.concurrent.ScheduledExecutorService scheduledExecutorService,
                        long blockTime)
        Parameters:
        scheduledExecutorService -
        blockTime -
      • sendRequest

        protected abstract EthFilter sendRequest()
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • process

        protected abstract void process​(java.util.List<EthLog.LogResult> logResults)
      • cancel

        public void cancel()
      • uninstallFilter

        protected EthUninstallFilter uninstallFilter​(java.math.BigInteger filterId)
                                              throws java.io.IOException
        Throws:
        java.io.IOException
      • getFilterLogs

        protected abstract java.util.Optional<Request<?,​EthLog>> getFilterLogs​(java.math.BigInteger filterId)
        Retrieves historic filters for the filter with the given id. Getting historic logs is not supported by all filters. If not the method should return an empty EthLog object
        Parameters:
        filterId - Id of the filter for which the historic log should be retrieved
        Returns:
        Historic logs, or an empty optional if the filter cannot retrieve historic logs