net.i2p.router

## Class ClientMessagePool

- java.lang.Object
- - net.i2p.router.ClientMessagePool

-     public class ClientMessagePool
      extends Object

  Manage all of the inbound and outbound client messages maintained by the router. The ClientManager subsystem fetches messages from this for locally deliverable messages and adds in remotely deliverable messages. Remotely deliverable messages are picked up by interested jobs and processed and transformed into an OutNetMessage to be eventually placed in the OutNetMessagePool.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientMessagePool(RouterContext context)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(ClientMessage msg)` Add a new client message to the pool.
    `void` | `add(ClientMessage msg, boolean isDefinitelyRemote)` Add a new client message with knowledge of whether it's remote.
    `OutboundCache` | `getCache()` Get the outbound cache for this message pool.
    `void` | `restart()` Restart the client message pool.
    `void` | `shutdown()` Shutdown the client message pool and clear all caches.

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

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

- - ### Constructor Detail

    - #### ClientMessagePool

          public ClientMessagePool(RouterContext context)

  - ### Method Detail

    - #### add

          public void add(ClientMessage msg)

      Add a new client message to the pool. The message is either locally or remotely destined.
      Parameters:
        `msg` - the ClientMessage to add

    - #### add

          public void add(ClientMessage msg,
                          boolean isDefinitelyRemote)

      Add a new client message with knowledge of whether it's remote. If we're coming from the client subsystem itself, we already know whether the target is definitely remote and as such don't need to recheck ourselves, but if we aren't certain, we want it to check for us.
      Parameters:
        `msg` - the ClientMessage to add
        `isDefinitelyRemote` - true if we know for sure that the target is not local

    - #### getCache

          public OutboundCache getCache()

      Get the outbound cache for this message pool.
      Returns:
        the OutboundCache instance

    - #### restart

          public void restart()

      Restart the client message pool.

    - #### shutdown

          public void shutdown()

      Shutdown the client message pool and clear all caches.