Package net.i2p.router
Class ClientManagerFacade
java.lang.Object
net.i2p.router.ClientManagerFacade
- All Implemented Interfaces:
Service
- Direct Known Subclasses:
ClientManagerFacadeImpl
,DummyClientManagerFacade
Manage all interactions with clients
- Author:
- jrandom
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract SessionConfig
Return the client's current config, or null if not connectedabstract SessionKeyManager
boolean
isAlive()
abstract boolean
isLocal
(Destination dest) Determine if the destination specified is managed locally.abstract boolean
Determine if the destination hash specified is managed locally.Return the list of locally connected clientsabstract void
messageDeliveryStatusUpdate
(Destination fromDest, MessageId id, long messageNonce, int status) abstract void
void
registerMetaDest
(Destination dest) Declare that we're going to publish a meta LS for this destination.void
renderStatusHTML
(Writer out) abstract void
reportAbuse
(Destination dest, String reason, int severity) Instruct the client (or all clients) that they are under attack.abstract 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.abstract void
requestLeaseSet
(Hash dest, LeaseSet set) boolean
shouldPublishLeaseSet
(Hash destinationHash) Does the client specified want their leaseSet published?abstract void
void
Declare that we're no longer going to publish a meta LS for this destination.boolean
-
Field Details
-
PROP_CLIENT_ONLY
- See Also:
-
-
Constructor Details
-
ClientManagerFacade
public ClientManagerFacade()
-
-
Method Details
-
requestLeaseSet
public abstract 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 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
-
requestLeaseSet
-
reportAbuse
Instruct the client (or all clients) that they are under attack. This call does not block.- 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
-
isLocal
Determine if the destination specified is managed locally. This call DOES block.- Parameters:
dest
- Destination to be checked
-
isLocal
Determine if the destination hash specified is managed locally. This call DOES block.- Parameters:
destHash
- Hash of Destination to be checked
-
messageDeliveryStatusUpdate
public abstract void messageDeliveryStatusUpdate(Destination fromDest, MessageId id, long messageNonce, int status) - Parameters:
id
- the router's ID for this messagemessageNonce
- the client's ID for this messagestatus
- see I2CP MessageStatusMessage for success/failure codes
-
messageReceived
-
verifyClientLiveliness
public boolean verifyClientLiveliness() -
isAlive
public boolean isAlive() -
shouldPublishLeaseSet
Does the client specified want their leaseSet published? -
listClients
Return the list of locally connected clients- Returns:
- set of Destination objects
-
getClientSessionConfig
Return the client's current config, or null if not connected -
getClientSessionKeyManager
-
renderStatusHTML
- Specified by:
renderStatusHTML
in interfaceService
- Throws:
IOException
-
shutdown
- Since:
- 0.8.8
-
registerMetaDest
Declare that we're going to publish a meta LS for this destination. Must be called before publishing the leaseset.- Throws:
I2PSessionException
- on duplicate dest- Since:
- 0.9.41
-
unregisterMetaDest
Declare that we're no longer going to publish a meta LS for this destination.- Since:
- 0.9.41
-