public class ClientManagerFacadeImpl extends ClientManagerFacade implements InternalClientManager
| Modifier and Type | Field and Description |
|---|---|
static String | DEFAULT_HOSTDefault host |
static int | DEFAULT_PORTDefault port |
static String | PROP_CLIENT_HOSTNote that this is different than the property the client side uses, i2cp.tcp.host |
static String | PROP_CLIENT_PORTNote that this is different than the property the client side uses, i2cp.tcp.port |
PROP_CLIENT_ONLY| Constructor and Description |
|---|
ClientManagerFacadeImpl(RouterContext context) |
| Modifier and Type | Method and Description |
|---|---|
I2CPMessageQueue | connect()The InternalClientManager interface. |
FloodfillNetworkDatabaseFacade | getClientFloodfillNetworkDatabaseFacade(Hash destHash)get the FloodfillNetworkDatabaseFacade associated with a particular client destination. |
SessionConfig | getClientSessionConfig(Destination dest)Return the client's current config, or null if not connected |
SessionKeyManager | getClientSessionKeyManager(Hash dest)Return the client's current manager or null if not connected |
long | getMinTimeToLeaseExpiry()Get the minimum time to lease expiry across all clients. |
Set<Hash> | getPrimaryHashes()get all the primary hashes for all the clients and return them as a set |
static int | getWriterQueueSize() |
boolean | isAlive()Check whether this service is alive. |
boolean | isLocal(Destination dest)Determine if the destination specified is managed locally. |
boolean | isLocal(Hash destHash)Determine if the destination specified is managed locally. |
Set<Destination> | listClients()Return the list of locally connected clients |
void | messageDeliveryStatusUpdate(Destination fromDest,
MessageId id,
long messageNonce,
int status)Update the delivery status of a message. |
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 | reportAbuse(Destination dest,
String reason,
int severity)Instruct the client (or all clients) that they are under attack. |
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. |
void | requestLeaseSet(Hash dest,
LeaseSet set)Request that a particular client authorize the Leases contained in the LeaseSet. |
void | restart()Restart the service |
static void | setWriterQueueSize(int val) |
boolean | shouldPublishLeaseSet(Hash destinationHash)Does the client specified want their leaseSet published? |
void | shutdown()shutdown. |
void | shutdown(String msg)Shut down the client manager with a reason message. |
void | startup()startup. |
void | unregisterMetaDest(Destination dest)Declare that we're no longer going to publish a meta LS for this destination. |
boolean | verifyClientLiveliness()verifyClientLiveliness. |
renderStatusHTMLpublic static final String DEFAULT_HOST
public static final int DEFAULT_PORT
public static final String PROP_CLIENT_HOST
public static final String PROP_CLIENT_PORT
public ClientManagerFacadeImpl(RouterContext context)
public I2CPMessageQueue connect() throws I2PSessionException
connect in interface InternalClientManagerI2PSessionException - if the router isn't readypublic FloodfillNetworkDatabaseFacade getClientFloodfillNetworkDatabaseFacade(Hash destHash)
getClientFloodfillNetworkDatabaseFacade in class ClientManagerFacadedestHash - destination hash associated with the client who's subDb we're looking forpublic SessionConfig getClientSessionConfig(Destination dest)
getClientSessionConfig in class ClientManagerFacadedest - the client destinationpublic SessionKeyManager getClientSessionKeyManager(Hash dest)
getClientSessionKeyManager in class ClientManagerFacadedest - the destination hashpublic long getMinTimeToLeaseExpiry()
public Set<Hash> getPrimaryHashes()
getPrimaryHashes in class ClientManagerFacadepublic static int getWriterQueueSize()
public boolean isAlive()
ClientManagerFacadeisAlive in class ClientManagerFacadepublic boolean isLocal(Destination dest)
isLocal in class ClientManagerFacadedest - Destination to be checkedpublic boolean isLocal(Hash destHash)
isLocal in class ClientManagerFacadedestHash - Hash of Destination to be checkedpublic Set<Destination> listClients()
listClients in class ClientManagerFacadepublic void messageDeliveryStatusUpdate(Destination fromDest, MessageId id, long messageNonce, int status)
ClientManagerFacademessageDeliveryStatusUpdate in class ClientManagerFacadeid - the router's ID for this messagemessageNonce - the client's ID for this message, greater than zerostatus - see I2CP MessageStatusMessage for success/failure codesfromDest - the source destination of the messagepublic void messageReceived(ClientMessage msg)
ClientManagerFacademessageReceived in class ClientManagerFacademsg - the received client messagepublic void registerMetaDest(Destination dest) throws I2PSessionException
registerMetaDest in class ClientManagerFacadedest - the destination to registerI2PSessionException - on duplicate destpublic void reportAbuse(Destination dest, String reason, int severity)
reportAbuse in class ClientManagerFacadedest - 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 void requestLeaseSet(Destination dest, LeaseSet set, long timeout, Job onCreateJob, Job onFailedJob)
requestLeaseSet in class ClientManagerFacadedest - 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)
The LeaseSet contains Leases only; it is unsigned and does not have the destination set.timeout - ms to wait before failingonCreateJob - Job to run after the LeaseSet is authorizedonFailedJob - Job to run after the timeout passes without receiving authorizationpublic void requestLeaseSet(Hash dest, LeaseSet set)
requestLeaseSet in class ClientManagerFacadedest - 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).
The LeaseSet contains Leases only; it is unsigned and does not have the destination set.public static void setWriterQueueSize(int val)
public boolean shouldPublishLeaseSet(Hash destinationHash)
ClientManagerFacadeshouldPublishLeaseSet in class ClientManagerFacadedestinationHash - the destination hash to checkpublic void shutdown(String msg)
ClientManagerFacadeshutdown in class ClientManagerFacademsg - message to send to the clientspublic void unregisterMetaDest(Destination dest)
unregisterMetaDest in class ClientManagerFacadedest - the destination to unregisterpublic boolean verifyClientLiveliness()
verifyClientLiveliness in class ClientManagerFacade