Class DefaultAgentForwardSupport

java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.common.util.closeable.IoBaseCloseable
org.apache.sshd.common.util.closeable.AbstractCloseable
org.apache.sshd.agent.common.DefaultAgentForwardSupport
All Implemented Interfaces:
Closeable, AutoCloseable, Channel, AgentForwardSupport, org.apache.sshd.common.Closeable

public class DefaultAgentForwardSupport extends org.apache.sshd.common.util.closeable.AbstractCloseable implements AgentForwardSupport
Author:
Apache MINA SSHD Project
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable

    org.apache.sshd.common.util.closeable.AbstractCloseable.State
  • Field Summary

    Fields inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable

    closeFuture, futureLock, state

    Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean

    log
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected SshAgentServer
     
    protected void
     
    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.
     

    Methods inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable

    addCloseFutureListener, builder, close, doCloseGracefully, getFutureLock, isClosed, isClosing, preClose, removeCloseFutureListener

    Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean

    debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.sshd.common.Closeable

    addCloseFutureListener, close, isClosed, isClosing, isOpen, removeCloseFutureListener
  • Constructor Details

    • DefaultAgentForwardSupport

      public DefaultAgentForwardSupport(ConnectionService service)
  • Method Details

    • initialize

      public String initialize() throws 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:
      IOException - If failed to initialize
    • createSshAgentServer

      protected SshAgentServer createSshAgentServer(ConnectionService service, Session session) throws Throwable
      Throws:
      Throwable
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Channel
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface org.apache.sshd.common.Closeable
      Throws:
      IOException
    • doCloseImmediately

      protected void doCloseImmediately()
      Overrides:
      doCloseImmediately in class org.apache.sshd.common.util.closeable.AbstractCloseable
    • toString

      public String toString()
      Overrides:
      toString in class Object