public abstract class ClientManagerFacade extends Object implements Service
| Modifier and Type | Field and Description |
|---|---|
static String | PROP_CLIENT_ONLYProperty key for client only |
| Modifier | Constructor and Description |
|---|---|
protected | ClientManagerFacade()Package-private constructor for abstract class. |
| Modifier and Type | Method and Description |
|---|---|
abstract FloodfillNetworkDatabaseFacade | getClientFloodfillNetworkDatabaseFacade(Hash destHash)get the FloodfillNetworkDatabaseFacade associated with a particular client destination. |
abstract SessionConfig | getClientSessionConfig(Destination dest)Return the client's current config, or null if not connected. |
abstract SessionKeyManager | getClientSessionKeyManager(Hash dest)Get the session key manager for a given client. |
abstract Set<Hash> | getPrimaryHashes()get a set of all primary hashes |
boolean | isAlive()Check whether this service is alive. |
abstract boolean | isLocal(Destination dest)Determine if the destination specified is managed locally. |
abstract boolean | isLocal(Hash destHash)Determine if the destination hash specified is managed locally. |
Set<Destination> | listClients()Return the list of locally connected clients |
abstract void | messageDeliveryStatusUpdate(Destination fromDest,
MessageId id,
long messageNonce,
int status)Update the delivery status of a message. |
abstract void | messageReceived(ClientMessage msg)Receive a message from the network for a local client. |
void | registerMetaDest(Destination dest)Declare that we're going to publish a meta LS for this destination. |
void | renderStatusHTML(Writer out)renderStatusHTML. |
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)Request that the client authorize the Leases contained in the
LeaseSet, identified by destination hash. |
boolean | shouldPublishLeaseSet(Hash destinationHash)Does the client specified want their leaseSet published? |
abstract void | shutdown(String msg)Shut down the client manager with a reason message. |
void | unregisterMetaDest(Destination dest)Declare that we're no longer going to publish a meta LS for this destination. |
boolean | verifyClientLiveliness()Verify that the client manager is still alive and responding. |
public static final String PROP_CLIENT_ONLY
protected ClientManagerFacade()
public abstract FloodfillNetworkDatabaseFacade getClientFloodfillNetworkDatabaseFacade(Hash destHash)
destHash - destination hash associated with the client who's subDb we're looking forpublic abstract SessionConfig getClientSessionConfig(Destination dest)
dest - the client destinationpublic abstract SessionKeyManager getClientSessionKeyManager(Hash dest)
dest - the destination hashpublic abstract Set<Hash> getPrimaryHashes()
public boolean isAlive()
public abstract boolean isLocal(Destination dest)
dest - Destination to be checkedpublic abstract boolean isLocal(Hash destHash)
destHash - Hash of Destination to be checkedpublic Set<Destination> listClients()
public abstract void messageDeliveryStatusUpdate(Destination fromDest, MessageId id, long messageNonce, int status)
fromDest - the source destination of the messageid - the router's ID for this messagemessageNonce - the client's ID for this messagestatus - see I2CP MessageStatusMessage for success/failure codespublic abstract void messageReceived(ClientMessage msg)
msg - the received client messagepublic void registerMetaDest(Destination dest) throws I2PSessionException
dest - the destination to registerI2PSessionException - on duplicate destpublic void renderStatusHTML(Writer out) throws IOException
renderStatusHTML in interface Serviceout - the writer to write toIOException - if an error occurs writingpublic abstract void reportAbuse(Destination dest, String reason, int severity)
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 maxpublic abstract void requestLeaseSet(Destination dest, LeaseSet set, long timeout, Job onCreateJob, Job onFailedJob)
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 authorizationpublic abstract void requestLeaseSet(Hash dest, LeaseSet set)
dest - Hash of the destinationset - LeaseSet with requested leasespublic boolean shouldPublishLeaseSet(Hash destinationHash)
destinationHash - the destination hash to checkpublic abstract void shutdown(String msg)
msg - the shutdown reasonpublic void unregisterMetaDest(Destination dest)
dest - the destination to unregisterpublic boolean verifyClientLiveliness()