Class ClientManagerFacadeImpl

    • Field Detail

      • PROP_CLIENT_PORT

        public static final String PROP_CLIENT_PORT
        note that this is different than the property the client side uses, i2cp.tcp.port
        See Also:
        Constant Field Values
      • PROP_CLIENT_HOST

        public static final String PROP_CLIENT_HOST
        note that this is different than the property the client side uses, i2cp.tcp.host
        See Also:
        Constant Field Values
    • Constructor Detail

      • ClientManagerFacadeImpl

        public ClientManagerFacadeImpl​(RouterContext context)
    • Method Detail

      • startup

        public void startup()
        Description copied from interface: Service
        Instruct the service that it should start normal operation. This call DOES block until the service is ready.
        Specified by:
        startup in interface Service
      • shutdown

        public void shutdown()
        Description copied from interface: Service
        Instruct 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.
        Specified by:
        shutdown in interface Service
      • shutdown

        public void shutdown​(String msg)
        Specified by:
        shutdown in class ClientManagerFacade
        Parameters:
        msg - message to send to the clients
        Since:
        0.8.8
      • restart

        public void restart()
        Description copied from interface: Service
        Perform a soft restart.
        Specified by:
        restart in interface Service
      • requestLeaseSet

        public 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. UNUSED, the call below without jobs is always used.
        Specified by:
        requestLeaseSet in class ClientManagerFacade
        Parameters:
        dest - Destination from which the LeaseSet's authorization should be requested
        set - 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 failing
        onCreateJob - Job to run after the LeaseSet is authorized
        onFailedJob - Job to run after the timeout passes without receiving authorization
      • requestLeaseSet

        public void requestLeaseSet​(Hash dest,
                                    LeaseSet set)
        Request that a particular client authorize the Leases contained in the LeaseSet.
        Specified by:
        requestLeaseSet in class ClientManagerFacade
        Parameters:
        dest - Destination from which the LeaseSet's authorization should be requested
        set - 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.
      • reportAbuse

        public void reportAbuse​(Destination dest,
                                String reason,
                                int severity)
        Instruct the client (or all clients) that they are under attack. This call does not block.
        Specified by:
        reportAbuse in class ClientManagerFacade
        Parameters:
        dest - Destination under attack, or null if all destinations are affected
        reason - Why the router thinks that there is abusive behavior
        severity - How severe the abuse is, with 0 being not severe and 255 is the max
      • isLocal

        public boolean isLocal​(Destination dest)
        Determine if the destination specified is managed locally. This call DOES block.
        Specified by:
        isLocal in class ClientManagerFacade
        Parameters:
        dest - Destination to be checked
      • isLocal

        public boolean isLocal​(Hash destHash)
        Determine if the destination specified is managed locally. This call DOES block.
        Specified by:
        isLocal in class ClientManagerFacade
        Parameters:
        destHash - Hash of Destination to be checked
      • messageDeliveryStatusUpdate

        public void messageDeliveryStatusUpdate​(Destination fromDest,
                                                MessageId id,
                                                long messageNonce,
                                                int status)
        Specified by:
        messageDeliveryStatusUpdate in class ClientManagerFacade
        Parameters:
        id - the router's ID for this message
        messageNonce - the client's ID for this message, greater than zero
        status - see I2CP MessageStatusMessage for success/failure codes