java.lang.Object
net.i2p.router.ClientManagerFacade
net.i2p.router.dummy.DummyClientManagerFacade
- All Implemented Interfaces:
Service
Manage all interactions with clients.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate RouterContextThe router context the dummy facade reports on.Fields inherited from class ClientManagerFacade
PROP_CLIENT_ONLYConstructor Summary
ConstructorsConstructorDescriptionInitializes this facade with the router context.Method Summary
All MethodsModifier and TypeMethodDescriptionReturn the floodfill network database facade.Return the client's current config, or null if not connected.getClientSessionKeyManager(Hash _dest) The session key manager for a given client.Return the set of primary hashes.booleanisLocal(Destination dest) Determine if the destination specified is managed locally.booleanDetermine if the destination hash specified is managed locally.voidmessageDeliveryStatusUpdate(Destination fromDest, MessageId id, long msgNonce, int status) Update the delivery status of a message.voidReceive a message from the network for a local client.voidreportAbuse(Destination dest, String reason, int severity) Instruct the client (or all clients) that they are under attack.voidrequestLeaseSet(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.voidrequestLeaseSet(Hash dest, LeaseSet set) Request that the client authorize the Leases contained in the LeaseSet, identified by destination hash.voidrestart()Perform a soft restart.voidshutdown()Instruct the service that the router is shutting down and that it should do whatever is necessary to go down gracefully.voidShut down the client manager with a reason message.voidstartup()Instruct the service that it should start normal operation.voidPrevents further client connections from being accepted.Methods inherited from class ClientManagerFacade
isAlive, listClients, registerMetaDest, renderStatusHTML, shouldPublishLeaseSet, unregisterMetaDest, verifyClientLivelinessModifier and TypeMethodDescriptionbooleanisAlive()Check whether this service is alive.Return the list of locally connected clients.voidregisterMetaDest(Destination dest) Declare that we're going to publish a meta LS for this destination.voidrenderStatusHTML(Writer out) Render the client status HTML.booleanshouldPublishLeaseSet(Hash destinationHash) Does the client specified want their leaseSet published?voidDeclare that we're no longer going to publish a meta LS for this destination.booleanVerify that the client manager is still alive and responding.
Field Details
_context
The router context the dummy facade reports on.
Constructor Details
DummyClientManagerFacade
Initializes this facade with the router context.- Parameters:
ctx- the router context
Method Details
isLocal
Description copied from class:ClientManagerFacadeDetermine if the destination hash specified is managed locally. This call DOES block.- Specified by:
isLocalin classClientManagerFacade- Parameters:
destHash- Hash of Destination to be checked- Returns:
- true if the destination hash is local
isLocal
Description copied from class:ClientManagerFacadeDetermine if the destination specified is managed locally. This call DOES block.- Specified by:
isLocalin classClientManagerFacade- Parameters:
dest- Destination to be checked- Returns:
- true if the destination is local
reportAbuse
Description copied from class:ClientManagerFacadeInstruct the client (or all clients) that they are under attack. This call does not block.- Specified by:
reportAbusein classClientManagerFacade- Parameters:
dest- Destination under attack, or null if all destinations are affectedreason- Why the router thinks that there is abusive behaviorseverity- How severe the abuse is, with 0 being not severe and 255 is the max
messageReceived
Description copied from class:ClientManagerFacadeReceive a message from the network for a local client.- Specified by:
messageReceivedin classClientManagerFacade- Parameters:
msg- the received client message
requestLeaseSet
public void requestLeaseSet(Destination dest, LeaseSet set, long timeout, Job onCreateJob, Job onFailedJob) Description copied from class:ClientManagerFacadeRequest 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:
requestLeaseSetin classClientManagerFacade- Parameters:
dest- Destination from which the LeaseSet's authorization should be requestedset- 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 failingonCreateJob- Job to run after the LeaseSet is authorizedonFailedJob- Job to run after the timeout passes without receiving authorization
startup
public void startup()Description copied from interface:ServiceInstruct 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:ServiceInstruct 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
Description copied from class:ClientManagerFacadeShut down the client manager with a reason message.- Specified by:
shutdownin classClientManagerFacade- Parameters:
msg- the shutdown reason
restart
messageDeliveryStatusUpdate
public void messageDeliveryStatusUpdate(Destination fromDest, MessageId id, long msgNonce, int status) Description copied from class:ClientManagerFacadeUpdate the delivery status of a message.- Specified by:
messageDeliveryStatusUpdatein classClientManagerFacade- Parameters:
fromDest- the source destination of the messageid- the router's ID for this messagemsgNonce- the client's ID for this messagestatus- see I2CP MessageStatusMessage for success/failure codes
getClientSessionConfig
Description copied from class:ClientManagerFacadeReturn the client's current config, or null if not connected.- Specified by:
getClientSessionConfigin classClientManagerFacade- Parameters:
_dest- the client destination- Returns:
- the client session config, or null
getClientSessionKeyManager
Description copied from class:ClientManagerFacadeThe session key manager for a given client.- Specified by:
getClientSessionKeyManagerin classClientManagerFacade- Parameters:
_dest- the destination hash- Returns:
- the session key manager
requestLeaseSet
Description copied from class:ClientManagerFacadeRequest that the client authorize the Leases contained in the LeaseSet, identified by destination hash.- Specified by:
requestLeaseSetin classClientManagerFacade- Parameters:
dest- Hash of the destinationset- LeaseSet with requested leases
getClientFloodfillNetworkDatabaseFacade
Return the floodfill network database facade.- Specified by:
getClientFloodfillNetworkDatabaseFacadein classClientManagerFacade- Parameters:
dbid- destination hash associated with the client who's subDb we're looking for- Returns:
- the client floodfill network database facade
getPrimaryHashes
Return the set of primary hashes.- Specified by:
getPrimaryHashesin classClientManagerFacade- Returns:
- the primary hashes