Package net.i2p.router
Class MessageValidator
java.lang.Object
net.i2p.router.MessageValidator
Singleton to manage the logic (and historical data) to determine whether a message
is valid or not (meaning it isn't expired and hasn't already been received). We'll
need a revamp once we start dealing with long message expirations (since it might
involve keeping a significant number of entries in memory), but that probably won't
be necessary until I2P 3.0.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) void
shutdown()
void
startup()
validateMessage
(long expiration) Only check the expiration for the messagevalidateMessage
(long messageId, long expiration) Determine if this message should be accepted as valid (not expired, not a duplicate)
-
Constructor Details
-
MessageValidator
-
-
Method Details
-
validateMessage
Determine if this message should be accepted as valid (not expired, not a duplicate)- Returns:
- reason why the message is invalid (or null if the message is valid)
-
validateMessage
Only check the expiration for the message -
startup
public void startup() -
shutdown
void shutdown()
-