class SearchMessageSelector extends Object implements MessageSelector
Filters incoming DatabaseStoreMessage and DatabaseSearchReplyMessage to identify responses corresponding to ongoing search operations. Tracks match status, expiration times, and coordinates with SearchState to manage pending peer queries.
Provides unique identification for each selector instance and implements continuation logic based on search progress and timeout conditions. Ensures proper response correlation between sent queries and received replies.
| Constructor and Description |
|---|
SearchMessageSelector(RouterContext context,
RouterInfo peer,
long expiration,
SearchState state) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
continueMatching()
Returns true if the selector should still keep searching for further matches.
|
long |
getExpiration()
Returns the # of milliseconds since the epoch after which this selector should
stop searching for matches.
|
boolean |
isMatch(I2NPMessage message)
Returns true if the received message matches the selector.
|
String |
toString() |
public SearchMessageSelector(RouterContext context, RouterInfo peer, long expiration, SearchState state)
public boolean continueMatching()
MessageSelectorcontinueMatching in interface MessageSelectorpublic long getExpiration()
MessageSelectorgetExpiration in interface MessageSelectorpublic boolean isMatch(I2NPMessage message)
MessageSelectorisMatch in interface MessageSelector