Package net.i2p.router.dummy
Class DummyClientManagerFacade
- java.lang.Object
-
- net.i2p.router.ClientManagerFacade
-
- net.i2p.router.dummy.DummyClientManagerFacade
-
- All Implemented Interfaces:
Service
public class DummyClientManagerFacade extends ClientManagerFacade
Manage all interactions with clients- Author:
- jrandom
-
-
Field Summary
-
Fields inherited from class net.i2p.router.ClientManagerFacade
PROP_CLIENT_ONLY
-
-
Constructor Summary
Constructors Constructor Description DummyClientManagerFacade(RouterContext ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SessionConfiggetClientSessionConfig(Destination _dest)Return the client's current config, or null if not connectedSessionKeyManagergetClientSessionKeyManager(Hash _dest)booleanisLocal(Destination dest)Determine if the destination specified is managed locally.booleanisLocal(Hash destHash)Determine if the destination hash specified is managed locally.voidmessageDeliveryStatusUpdate(Destination fromDest, MessageId id, long msgNonce, int status)voidmessageReceived(ClientMessage msg)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)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.voidshutdown(String msg)voidstartup()Instruct the service that it should start normal operation.voidstopAcceptingClients()-
Methods inherited from class net.i2p.router.ClientManagerFacade
isAlive, listClients, registerMetaDest, renderStatusHTML, shouldPublishLeaseSet, unregisterMetaDest, verifyClientLiveliness
-
-
-
-
Constructor Detail
-
DummyClientManagerFacade
public DummyClientManagerFacade(RouterContext ctx)
-
-
Method Detail
-
isLocal
public boolean isLocal(Hash destHash)
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
-
isLocal
public boolean isLocal(Destination dest)
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
-
reportAbuse
public void reportAbuse(Destination dest, String reason, int severity)
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
public void messageReceived(ClientMessage msg)
- Specified by:
messageReceivedin classClientManagerFacade
-
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()
-
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
public void shutdown(String msg)
- Specified by:
shutdownin classClientManagerFacade
-
restart
public void restart()
Description copied from interface:ServicePerform a soft restart.
-
messageDeliveryStatusUpdate
public void messageDeliveryStatusUpdate(Destination fromDest, MessageId id, long msgNonce, int status)
- Specified by:
messageDeliveryStatusUpdatein classClientManagerFacadeid- the router's ID for this messagemsgNonce- the client's ID for this messagestatus- see I2CP MessageStatusMessage for success/failure codes
-
getClientSessionConfig
public SessionConfig getClientSessionConfig(Destination _dest)
Description copied from class:ClientManagerFacadeReturn the client's current config, or null if not connected- Specified by:
getClientSessionConfigin classClientManagerFacade
-
getClientSessionKeyManager
public SessionKeyManager getClientSessionKeyManager(Hash _dest)
- Specified by:
getClientSessionKeyManagerin classClientManagerFacade
-
requestLeaseSet
public void requestLeaseSet(Hash dest, LeaseSet set)
- Specified by:
requestLeaseSetin classClientManagerFacade
-
-