Package org.apache.sshd.agent.unix
Class AgentServerProxy
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.agent.unix.AgentServerProxy
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Channel
,SshAgentServer
The server side fake agent, acting as an agent, but actually forwarding the requests to the auth channel on the
client side.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate 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
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
Constructor Summary
ConstructorsConstructorDescriptionAgentServerProxy
(ConnectionService service) AgentServerProxy
(ConnectionService service, CloseableExecutorService executor) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected boolean
deleteFile
(File file, String msg, boolean debugEnabled) getId()
boolean
isOpen()
protected File
removeSocketFile
(String socketPath, boolean debugEnabled) protected void
signalEOS
(AprLibrary libInstance, boolean debugEnabled) static IOException
toIOException
(int code) transform an APR error number in a more fancy exception
-
Field Details
-
END_OF_STREAM_MESSAGE
private static final byte[] END_OF_STREAM_MESSAGE -
service
-
authSocket
-
pool
private final long pool -
handle
private final long handle -
piper
-
pipeService
-
open
-
innerFinished
-
-
Constructor Details
-
AgentServerProxy
- Throws:
IOException
-
AgentServerProxy
public AgentServerProxy(ConnectionService service, CloseableExecutorService executor) throws IOException - Throws:
IOException
-
-
Method Details
-
isOpen
public boolean isOpen() -
getExecutorService
-
getId
- Specified by:
getId
in interfaceSshAgentServer
- Returns:
- Agent server identifier
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceChannel
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
removeSocketFile
- Throws:
Exception
-
signalEOS
- Throws:
Exception
-
deleteFile
-
toIOException
transform an APR error number in a more fancy exception- Parameters:
code
- APR error code- Returns:
IOException
with the exception details for the given APR error number
-