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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
getFilterLogs
(BigInteger filterId) Retrieves historic filters for the filter with the given id.protected abstract void
process
(List<EthLog.LogResult> logResults) void
run
(ScheduledExecutorService scheduledExecutorService, long blockTime) protected abstract EthFilter
protected EthUninstallFilter
uninstallFilter
(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
-