Class I2PTunnelTask

    • Field Detail

      • open

        protected volatile boolean open
    • Method Detail

      • setTunnel

        public void setTunnel​(I2PTunnel pTunnel)
        for apps that use multiple I2PTunnel instances
      • getId

        public int getId()
      • isOpen

        public boolean isOpen()
      • setId

        public void setId​(int id)
      • setName

        protected void setName​(String name)
      • routerDisconnected

        protected void routerDisconnected()
      • close

        public abstract boolean close​(boolean forced)
        Note that the tunnel can be reopened after this by calling startRunning(). This may not release all resources. In particular, the I2PSocketManager remains and it may have timer threads that continue running. To release all resources permanently, call destroy().
        Returns:
        success
      • destroy

        public boolean destroy()
        Note that the tunnel cannot be reopened after this by calling startRunning(), as it may destroy the underlying socket manager, depending on implementation. This should release all resources. The implementation here simply calls close(true). Extending classes should override to release all resources.
        Returns:
        success
        Since:
        0.9.17
      • optionsUpdated

        public void optionsUpdated​(I2PTunnel tunnel)
        Notify the task that I2PTunnel's options have been updated. Extending classes should override and call I2PTunnel.getClientOptions(), then update the I2PSocketManager. Does nothing here.
        Since:
        0.9.1
      • connected

        public void connected​(I2PSession session)
        For tasks that don't call I2PTunnel.addSession() directly
        Since:
        0.8.13
      • disconnected

        public void disconnected​(I2PSession session)
      • errorOccurred

        public void errorOccurred​(I2PSession session,
                                  String message,
                                  Throwable error)
        Does nothing here. Extending classes may override.
      • reportAbuse

        public void reportAbuse​(I2PSession session,
                                int severity)
        Does nothing here. Extending classes may override.