java.lang.Object
net.i2p.client.impl.I2PClientMessageHandlerMap
- Direct Known Subclasses:
I2PSimpleSession.SimpleMessageHandlerMap
Contains a map of message handlers that a session will want to use.
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final I2CPMessageHandler[]Map of message type id--> I2CPMessageHandler.Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedI2PClientMessageHandlerMap(int highest) For extension by subclasses.I2PClientMessageHandlerMap(I2PAppContext context) Handler map for all standard I2CP message types.Method Summary
All MethodsModifier and TypeMethodDescriptiongetHandler(int messageTypeId) Return the handler for the given type.
Field Details
_handlers
Map of message type id--> I2CPMessageHandler.
Constructor Details
I2PClientMessageHandlerMap
protected I2PClientMessageHandlerMap(int highest) For extension by subclasses.- Parameters:
highest- the highest message type id the handler array must cover
I2PClientMessageHandlerMap
Handler map for all standard I2CP message types.- Parameters:
context- the app context passed to each handler that is created
Method Details
getHandler
Return the handler for the given type.- Parameters:
messageTypeId- the I2CP message type id to look up- Returns:
- the handler registered for that message type, or null if the id is out of range or has no handler