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
public class AgentServerProxy extends AbstractLoggingBean implements 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
-
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
-
Constructor Summary
Constructors Constructor Description AgentServerProxy(ConnectionService service)
AgentServerProxy(ConnectionService service, CloseableExecutorService executor)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
protected boolean
deleteFile(File file, String msg, boolean debugEnabled)
CloseableExecutorService
getExecutorService()
String
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
-
-
-
Constructor Detail
-
AgentServerProxy
public AgentServerProxy(ConnectionService service) throws IOException
- Throws:
IOException
-
AgentServerProxy
public AgentServerProxy(ConnectionService service, CloseableExecutorService executor) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getExecutorService
public CloseableExecutorService getExecutorService()
-
getId
public String getId()
- Specified by:
getId
in interfaceSshAgentServer
- Returns:
- Agent server identifier
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceChannel
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
removeSocketFile
protected File removeSocketFile(String socketPath, boolean debugEnabled) throws Exception
- Throws:
Exception
-
signalEOS
protected void signalEOS(AprLibrary libInstance, boolean debugEnabled) throws Exception
- Throws:
Exception
-
toIOException
public static IOException toIOException(int code)
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
-
-