net.i2p.router.message

## Class GarlicMessageHandler

- java.lang.Object
- - net.i2p.router.message.GarlicMessageHandler

- All Implemented Interfaces:
    HandlerJobBuilder

      public class GarlicMessageHandler
      extends Object
      implements HandlerJobBuilder

  Builds jobs to process garlic messages received outside tunnels. Handles floodfill netdb operations and garlic routing for direct peer communications.

  This is the handler for garlic message not received down a tunnel, which is the case for floodfills receiving netdb messages. It is not the handler for garlic messages received down a tunnel, as InNetMessagePool short circuits tunnel messages, and those garlic messages are handled in InboundMessageDistributor.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GarlicMessageHandler(RouterContext context)`
    `GarlicMessageHandler(RouterContext context, long msgIDBloomXorLocal, long msgIDBloomXorRouter, long msgIDBloomXorTunnel)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Job` | `createJob(I2NPMessage receivedMessage, RouterIdentity from, Hash fromHash)` Create a new job to handle the received message.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GarlicMessageHandler

          public GarlicMessageHandler(RouterContext context)

    - #### GarlicMessageHandler

          public GarlicMessageHandler(RouterContext context,
                                      long msgIDBloomXorLocal,
                                      long msgIDBloomXorRouter,
                                      long msgIDBloomXorTunnel)

  - ### Method Detail

    - #### createJob

          public Job createJob(I2NPMessage receivedMessage,
                               RouterIdentity from,
                               Hash fromHash)

      Description copied from interface: `HandlerJobBuilder`
      Create a new job to handle the received message.
      Specified by:
        `createJob` in interface `HandlerJobBuilder`
      Parameters:
        `receivedMessage` - I2NP message received
        `from` - router that sent the message (if available)
        `fromHash` - hash of the routerIdentity of the router that sent the message (if available)
      Returns:
        a job or null if no particular job is appropriate (in which case, the message should go into the inbound message pool)