Package org.web3j.protocol.core.filters
Class Filter<T>
java.lang.Object
org.web3j.protocol.core.filters.Filter<T>
- Direct Known Subclasses:
BlockFilter,BlocksFilter,LogFilter,LogsFilter,PendingTransactionFilter,PendingTransactionsFilter
Class for creating managed filter requests with callbacks.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()getFilterLogs(BigInteger filterId) Retrieves historic filters for the filter with the given id.protected abstract voidprocess(List<EthLog.LogResult> logResults) voidrun(ScheduledExecutorService scheduledExecutorService, long blockTime) protected abstract EthFilterprotected EthUninstallFilteruninstallFilter(BigInteger filterId)
-
Field Details
-
web3j
-
callback
-
schedule
-
-
Constructor Details
-
Filter
-
-
Method Details
-
run
-
sendRequest
- Throws:
IOException
-
process
-
cancel
public void cancel() -
uninstallFilter
- Throws:
IOException
-
getFilterLogs
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
-