## net.i2p.router.client
Class ClientManager

    java.lang.Object
      net.i2p.router.client.ClientManager

    public class ClientManager

extends java.lang.Object

Coordinate connections and various tasks

Author:
  jrandom

Constructor Summary
`ClientManager(RouterContext context, int port)`

Method Summary
`void` `destinationEstablished(ClientConnectionRunner runner)`
`(package private) void` `distributeMessage(Destination fromDest, Destination toDest, Payload payload, MessageId msgId)`
`SessionConfig` `getClientSessionConfig(Destination dest)` Return the client's current config, or null if not connected
`(package private) ClientConnectionRunner` `getRunner(Destination dest)`
`(package private) java.util.Set` `getRunnerDestinations()`
`boolean` `isLocal(Destination dest)`
`boolean` `isLocal(Hash destHash)`
`java.util.Set` `listClients()`
`void` `messageDeliveryStatusUpdate(Destination fromDest, MessageId id, boolean delivered)`
`void` `messageReceived(ClientMessage msg)`
`void` `registerConnection(ClientConnectionRunner runner)`
`void` `renderStatusHTML(java.io.Writer out)`
`void` `reportAbuse(Destination dest, java.lang.String reason, int severity)`
`void` `requestLeaseSet(Destination dest, LeaseSet set, long timeout, Job onCreateJob, Job onFailedJob)` Request that a particular client authorize the Leases contained in the LeaseSet, after which the onCreateJob is queued up.
`void` `requestLeaseSet(Hash dest, LeaseSet ls)`
`void` `restart()`
`boolean` `shouldPublishLeaseSet(Hash destHash)`
`void` `shutdown()`
`void` `unregisterConnection(ClientConnectionRunner runner)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ClientManager

    public ClientManager(RouterContext context,
                         int port)

Method Detail

### restart

    public void restart()

### shutdown

    public void shutdown()

### registerConnection

    public void registerConnection(ClientConnectionRunner runner)

### unregisterConnection

    public void unregisterConnection(ClientConnectionRunner runner)

### destinationEstablished

    public void destinationEstablished(ClientConnectionRunner runner)

### distributeMessage

    void distributeMessage(Destination fromDest,
                           Destination toDest,
                           Payload payload,
                           MessageId msgId)

### requestLeaseSet

    public void requestLeaseSet(Destination dest,
                                LeaseSet set,
                                long timeout,
                                Job onCreateJob,
                                Job onFailedJob)

  Request that a particular client authorize the Leases contained in the LeaseSet, after which the onCreateJob is queued up. If that doesn't occur within the timeout specified, queue up the onFailedJob. This call does not block.

  Parameters:
    `dest` - Destination from which the LeaseSet's authorization should be requested
    `set` - LeaseSet with requested leases - this object must be updated to contain the signed version (as well as any changed/added/removed Leases)
    `timeout` - ms to wait before failing
    `onCreateJob` - Job to run after the LeaseSet is authorized
    `onFailedJob` - Job to run after the timeout passes without receiving authorization

### requestLeaseSet

    public void requestLeaseSet(Hash dest,
                                LeaseSet ls)

### isLocal

    public boolean isLocal(Destination dest)

### isLocal

    public boolean isLocal(Hash destHash)

### shouldPublishLeaseSet

    public boolean shouldPublishLeaseSet(Hash destHash)

### listClients

    public java.util.Set listClients()

### getRunner

    ClientConnectionRunner getRunner(Destination dest)

### getClientSessionConfig

    public SessionConfig getClientSessionConfig(Destination dest)

  Return the client's current config, or null if not connected

### messageDeliveryStatusUpdate

    public void messageDeliveryStatusUpdate(Destination fromDest,
                                            MessageId id,
                                            boolean delivered)

### getRunnerDestinations

    java.util.Set getRunnerDestinations()

### reportAbuse

    public void reportAbuse(Destination dest,
                            java.lang.String reason,
                            int severity)

### renderStatusHTML

    public void renderStatusHTML(java.io.Writer out)
                          throws java.io.IOException

  Throws:
    `java.io.IOException`

### messageReceived

    public void messageReceived(ClientMessage msg)