public class DefaultAgentForwardSupport extends AbstractCloseable implements AgentForwardSupport
AbstractCloseable.State| Modifier and Type | Field and Description |
|---|---|
private java.util.concurrent.atomic.AtomicReference<SshAgentServer> |
agentServerHolder |
private ConnectionService |
serviceInstance |
closeFuture, lock, statelogCLOSE_WAIT_TIMEOUT, DEFAULT_CLOSE_WAIT_TIMEOUT| Constructor and Description |
|---|
DefaultAgentForwardSupport(ConnectionService service) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected SshAgentServer |
createSshAgentServer(ConnectionService service,
Session session) |
protected void |
doCloseImmediately()
doCloseImmediately is called once and only once
with state == Immediate
|
java.lang.String |
initialize()
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.
|
java.lang.String |
toString() |
addCloseFutureListener, builder, close, doCloseGracefully, isClosed, isClosing, preClose, removeCloseFutureListenergetSimplifiedLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddCloseFutureListener, close, close, getMaxCloseWaitTime, isClosed, isClosing, isOpen, removeCloseFutureListenerprivate final ConnectionService serviceInstance
private final java.util.concurrent.atomic.AtomicReference<SshAgentServer> agentServerHolder
public DefaultAgentForwardSupport(ConnectionService service)
public java.lang.String initialize()
throws java.io.IOException
AgentForwardSupportinitialize in interface AgentForwardSupportjava.io.IOException - If failed to initializeprotected SshAgentServer createSshAgentServer(ConnectionService service, Session session) throws java.lang.Throwable
java.lang.Throwablepublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface java.nio.channels.Channeljava.io.IOExceptionprotected void doCloseImmediately()
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
doCloseImmediately in class AbstractCloseablepublic java.lang.String toString()
toString in class java.lang.Object