java.lang.Object
net.i2p.router.ClientManagerFacade
net.i2p.router.dummy.DummyClientManagerFacade
All Implemented Interfaces:
Service

public class DummyClientManagerFacadeextends ClientManagerFacade
Manage all interactions with clients.
  • Field Details

    • _context

      private RouterContext _context
      The router context the dummy facade reports on.
  • Constructor Details

    • DummyClientManagerFacade

      public DummyClientManagerFacade(RouterContext ctx)
      Initializes this facade with the router context.
      Parameters:
      ctx - the router context
  • Method Details

    • isLocal

      public boolean isLocal(Hash destHash)
      Description copied from class: ClientManagerFacade
      Determine if the destination hash specified is managed locally. This call DOES block.
      Specified by:
      isLocal in class ClientManagerFacade
      Parameters:
      destHash - Hash of Destination to be checked
      Returns:
      true if the destination hash is local
    • isLocal

      public boolean isLocal(Destination dest)
      Description copied from class: ClientManagerFacade
      Determine if the destination specified is managed locally. This call DOES block.
      Specified by:
      isLocal in class ClientManagerFacade
      Parameters:
      dest - Destination to be checked
      Returns:
      true if the destination is local
    • reportAbuse

      public void reportAbuse(Destination dest, String reason, int severity)
      Description copied from class: ClientManagerFacade
      Instruct the client (or all clients) that they are under attack. This call does not block.
      Specified by:
      reportAbuse in class ClientManagerFacade
      Parameters:
      dest - Destination under attack, or null if all destinations are affected
      reason - Why the router thinks that there is abusive behavior
      severity - How severe the abuse is, with 0 being not severe and 255 is the max
    • messageReceived

      public void messageReceived(ClientMessage msg)
      Description copied from class: ClientManagerFacade
      Receive a message from the network for a local client.
      Specified by:
      messageReceived in class ClientManagerFacade
      Parameters:
      msg - the received client message
    • requestLeaseSet

      public void requestLeaseSet(Destination dest, LeaseSet set, long timeout, Job onCreateJob, Job onFailedJob)
      Description copied from class: ClientManagerFacade
      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.
      Specified by:
      requestLeaseSet in class ClientManagerFacade
      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
    • startup

      public void startup()
      Description copied from interface: Service
      Instruct the service that it should start normal operation. This call DOES block until the service is ready.
    • stopAcceptingClients

      public void stopAcceptingClients()
      Prevents further client connections from being accepted.
    • shutdown

      public void shutdown()
      Description copied from interface: Service
      Instruct the service that the router is shutting down and that it should do whatever is necessary to go down gracefully. It should not depend on other components at this point. This call DOES block.
    • shutdown

      public void shutdown(String msg)
      Description copied from class: ClientManagerFacade
      Shut down the client manager with a reason message.
      Specified by:
      shutdown in class ClientManagerFacade
      Parameters:
      msg - the shutdown reason
    • restart

      public void restart()
      Description copied from interface: Service
      Perform a soft restart.
    • messageDeliveryStatusUpdate

      public void messageDeliveryStatusUpdate(Destination fromDest, MessageId id, long msgNonce, int status)
      Description copied from class: ClientManagerFacade
      Update the delivery status of a message.
      Specified by:
      messageDeliveryStatusUpdate in class ClientManagerFacade
      Parameters:
      fromDest - the source destination of the message
      id - the router's ID for this message
      msgNonce - the client's ID for this message
      status - see I2CP MessageStatusMessage for success/failure codes
    • getClientSessionConfig

      public SessionConfig getClientSessionConfig(Destination _dest)
      Description copied from class: ClientManagerFacade
      Return the client's current config, or null if not connected.
      Specified by:
      getClientSessionConfig in class ClientManagerFacade
      Parameters:
      _dest - the client destination
      Returns:
      the client session config, or null
    • getClientSessionKeyManager

      public SessionKeyManager getClientSessionKeyManager(Hash _dest)
      Description copied from class: ClientManagerFacade
      The session key manager for a given client.
      Specified by:
      getClientSessionKeyManager in class ClientManagerFacade
      Parameters:
      _dest - the destination hash
      Returns:
      the session key manager
    • requestLeaseSet

      public void requestLeaseSet(Hash dest, LeaseSet set)
      Description copied from class: ClientManagerFacade
      Request that the client authorize the Leases contained in the LeaseSet, identified by destination hash.
      Specified by:
      requestLeaseSet in class ClientManagerFacade
      Parameters:
      dest - Hash of the destination
      set - LeaseSet with requested leases
    • getClientFloodfillNetworkDatabaseFacade

      public FloodfillNetworkDatabaseFacade getClientFloodfillNetworkDatabaseFacade(Hash dbid)
      Return the floodfill network database facade.
      Specified by:
      getClientFloodfillNetworkDatabaseFacade in class ClientManagerFacade
      Parameters:
      dbid - destination hash associated with the client who's subDb we're looking for
      Returns:
      the client floodfill network database facade
    • getPrimaryHashes

      public Set<Hash> getPrimaryHashes()
      Return the set of primary hashes.
      Specified by:
      getPrimaryHashes in class ClientManagerFacade
      Returns:
      the primary hashes