Top Description Fields Constructors Methods
org.apache.sshd.agent.unix

public Class AgentServerProxy

extends AbstractLoggingBean
implements SshAgentServer
Class Inheritance
All Implemented Interfaces
org.apache.sshd.agent.SshAgentServer, java.nio.channels.Channel, java.io.Closeable, java.lang.AutoCloseable
Imports
java.io.File, .IOException, java.nio.charset.StandardCharsets, java.util.Collection, java.util.concurrent.Future, java.util.concurrent.atomic.AtomicBoolean, org.apache.sshd.agent.SshAgentServer, org.apache.sshd.common.SshException, org.apache.sshd.common.session.ConnectionService, .Session, org.apache.sshd.common.util.GenericUtils, .OsUtils, org.apache.sshd.common.util.logging.AbstractLoggingBean, org.apache.sshd.common.util.threads.CloseableExecutorService, .ThreadUtils, org.apache.sshd.core.CoreModuleProperties, org.apache.tomcat.jni.Local, org.apache.tomcat.jni.Pool, org.apache.tomcat.jni.Socket, org.apache.tomcat.jni.Status

The server side fake agent, acting as an agent, but actually forwarding the requests to the auth channel on the client side.

Field Summary

Modifier and TypeField and Description
private final String
private static final byte[]
private final long
private final AtomicBoolean
private final AtomicBoolean
private Future<?>
private final CloseableExecutorService
private final long
private final ConnectionService
Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
log

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public synchronized void
close()

Implements java.nio.channels.Channel.close.

Closes this channel.

protected boolean
deleteFile(File file, String msg, boolean debugEnabled)

public CloseableExecutorService
public String
public boolean
isOpen()

Implements java.nio.channels.Channel.isOpen.

Tells whether or not this channel is open.

protected File
removeSocketFile(String socketPath, boolean debugEnabled)

protected void
signalEOS(AprLibrary libInstance, boolean debugEnabled)

public static IOException

Returns:

IOException with the exception details for the given APR error number
toIOException
(int
APR error code
code
)

transform an APR error number in a more fancy exception

Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
debugdebugdebugdebugdebugerrorerrorerrorerrorerrorgetSimplifiedLoggerinfoinfowarnwarnwarnwarnwarnwarnwarnwarn

Field Detail

authSocketback to summary
private final String authSocket
END_OF_STREAM_MESSAGEback to summary
private static final byte[] END_OF_STREAM_MESSAGE
handleback to summary
private final long handle
innerFinishedback to summary
private final AtomicBoolean innerFinished
openback to summary
private final AtomicBoolean open
piperback to summary
private Future<?> piper
pipeServiceback to summary
private final CloseableExecutorService pipeService
poolback to summary
private final long pool
serviceback to summary
private final ConnectionService service

Constructor Detail

AgentServerProxyback to summary
public AgentServerProxy(ConnectionService service) throws IOException
AgentServerProxyback to summary
public AgentServerProxy(ConnectionService service, CloseableExecutorService executor) throws IOException

Method Detail

closeback to summary
public synchronized void close() throws IOException

Implements java.nio.channels.Channel.close.

Doc from java.nio.channels.Channel.close.

Closes this channel.

After a channel is closed, any further attempt to invoke I/O operations upon it will cause a ClosedChannelException to be thrown.

If this channel is already closed then invoking this method has no effect.

This method may be invoked at any time. If some other thread has already invoked it, however, then another invocation will block until the first invocation is complete, after which it will return without effect.

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
deleteFileback to summary
protected boolean deleteFile(File file, String msg, boolean debugEnabled)
getExecutorServiceback to summary
public CloseableExecutorService getExecutorService()
getIdback to summary
public String getId()

Implements org.apache.sshd.agent.SshAgentServer.getId.

Returns:String

Doc from org.apache.sshd.agent.SshAgentServer.getId.

Agent server identifier

Annotations
@Override
isOpenback to summary
public boolean isOpen()

Implements java.nio.channels.Channel.isOpen.

Doc from java.nio.channels.Channel.isOpen.

Tells whether or not this channel is open.

Returns:boolean

true if, and only if, this channel is open

Annotations
@Override
removeSocketFileback to summary
protected File removeSocketFile(String socketPath, boolean debugEnabled) throws Exception
signalEOSback to summary
protected void signalEOS(AprLibrary libInstance, boolean debugEnabled) throws Exception
toIOExceptionback to summary
public static IOException toIOException(int code)

transform an APR error number in a more fancy exception

Parameters
code:int

APR error code

Returns:IOException

IOException with the exception details for the given APR error number