java.lang.Object
net.i2p.client.impl.HandlerImpl
- All Implemented Interfaces:
I2CPMessageHandler
- Direct Known Subclasses:
BWLimitsMessageHandler, DestReplyMessageHandler, DisconnectMessageHandler, HostReplyMessageHandler, MessagePayloadMessageHandler, MessageStatusMessageHandler, RequestLeaseSetMessageHandler, SessionStatusMessageHandler, SetDateMessageHandler
Base class for handling I2CP messages.
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final I2PAppContextThe application context.protected final LogThe logger.private final intThe message type this handler is registered for.Constructor Summary
ConstructorsConstructorDescriptionHandlerImpl(I2PAppContext context, int type) Store the app context and handler message type.Method Summary
All MethodsMethods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface I2CPMessageHandler
handleMessageModifier and TypeMethodDescriptionvoidhandleMessage(I2CPMessage message, I2PSessionImpl session) Handle an I2CP message.
Field Details
_log
The logger._type
private final int _typeThe message type this handler is registered for._context
The application context.
Constructor Details
HandlerImpl
Store the app context and handler message type.- Parameters:
context- the application context, whose log manager supplies the handler loggertype- the I2CP message type this handler is registered for
Method Details
getType
public int getType()Return the message type.- Specified by:
getTypein interfaceI2CPMessageHandler- Returns:
- the message type this handler was registered for