java.lang.Object
net.i2p.client.impl.I2PClientMessageHandlerMap
Direct Known Subclasses:
I2PSimpleSession.SimpleMessageHandlerMap

class I2PClientMessageHandlerMapextends Object
Contains a map of message handlers that a session will want to use.
  • Field Details

    • _handlers

      protected final I2CPMessageHandler[] _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

      public I2PClientMessageHandlerMap(I2PAppContext context)
      Handler map for all standard I2CP message types.
      Parameters:
      context - the app context passed to each handler that is created
  • Method Details

    • getHandler

      public I2CPMessageHandler getHandler(int messageTypeId)
      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