Class DefaultAgentForwardSupport

    • Field Detail

      • agentServerHolder

        private final java.util.concurrent.atomic.AtomicReference<SshAgentServer> agentServerHolder
    • Constructor Detail

      • DefaultAgentForwardSupport

        public DefaultAgentForwardSupport​(ConnectionService service)
    • Method Detail

      • initialize

        public java.lang.String initialize()
                                    throws java.io.IOException
        Description copied from interface: AgentForwardSupport
        Initializes the agent forwarding if not already done so - i.e., can be called more than once - only first successful call counts, the rest will return the identifier of the previously initialized agent.
        Specified by:
        initialize in interface AgentForwardSupport
        Returns:
        The agent ID
        Throws:
        java.io.IOException - If failed to initialize
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.nio.channels.Channel
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface Closeable
        Throws:
        java.io.IOException
      • doCloseImmediately

        protected void doCloseImmediately()
        Description copied from class: AbstractCloseable

        doCloseImmediately is called once and only once with state == Immediate

        Overriding methods should always call the base implementation. It may be called concurrently while preClose() or doCloseGracefully is executing

        Overrides:
        doCloseImmediately in class AbstractCloseable
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object