Package org.apache.sshd.agent.common
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,Closeable
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
AbstractCloseable.State -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AtomicReference<SshAgentServer> private final ConnectionServiceFields inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
closeFuture, futureLock, stateFields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected SshAgentServercreateSshAgentServer(ConnectionService service, Session session) protected voiddoCloseImmediately is called once and only once with state == ImmediateInitializes 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.toString()Methods inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
addCloseFutureListener, builder, close, doCloseGracefully, getFutureLock, isClosed, isClosing, preClose, removeCloseFutureListenerMethods 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, warnMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.sshd.common.Closeable
addCloseFutureListener, close, isClosed, isClosing, isOpen, removeCloseFutureListener
-
Field Details
-
serviceInstance
-
agentServerHolder
-
-
Constructor Details
-
DefaultAgentForwardSupport
-
-
Method Details
-
initialize
Description copied from interface:AgentForwardSupportInitializes 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:
initializein interfaceAgentForwardSupport- Returns:
- The agent ID
- Throws:
IOException- If failed to initialize
-
createSshAgentServer
protected SshAgentServer createSshAgentServer(ConnectionService service, Session session) throws Throwable - Throws:
Throwable
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
doCloseImmediately
protected void doCloseImmediately()Description copied from class:AbstractCloseabledoCloseImmediately 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:
doCloseImmediatelyin classAbstractCloseable
-
toString
-