Package org.apache.sshd.agent.common
Class AbstractAgentProxy
- java.lang.Object
-
- org.apache.sshd.common.util.logging.AbstractLoggingBean
-
- org.apache.sshd.agent.common.AbstractAgentProxy
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Channel
,SshAgent
,ExecutorServiceCarrier
public abstract class AbstractAgentProxy extends AbstractLoggingBean implements SshAgent, ExecutorServiceCarrier
- Author:
- Apache MINA SSHD Project
-
-
Field Summary
-
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
Fields inherited from interface org.apache.sshd.agent.SshAgent
SSH_AUTHSOCKET_ENV_NAME
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractAgentProxy(CloseableExecutorService executorService)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addIdentity(KeyPair kp, String comment)
void
close()
protected Buffer
createBuffer(byte cmd)
protected Buffer
createBuffer(byte cmd, int extraLen)
String
getChannelType()
CloseableExecutorService
getExecutorService()
Iterable<? extends Map.Entry<PublicKey,String>>
getIdentities()
protected Buffer
prepare(Buffer buffer)
void
removeAllIdentities()
void
removeIdentity(PublicKey key)
protected abstract Buffer
request(Buffer buffer)
void
setChannelType(String channelType)
byte[]
sign(SessionContext session, PublicKey key, byte[] data)
-
Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
getSimplifiedLogger
-
-
-
-
Constructor Detail
-
AbstractAgentProxy
protected AbstractAgentProxy(CloseableExecutorService executorService)
-
-
Method Detail
-
getChannelType
public String getChannelType()
-
setChannelType
public void setChannelType(String channelType)
-
getExecutorService
public CloseableExecutorService getExecutorService()
- Specified by:
getExecutorService
in interfaceExecutorServiceCarrier
- Returns:
- The
CloseableExecutorService
to use
-
getIdentities
public Iterable<? extends Map.Entry<PublicKey,String>> getIdentities() throws IOException
- Specified by:
getIdentities
in interfaceSshAgent
- Throws:
IOException
-
sign
public byte[] sign(SessionContext session, PublicKey key, byte[] data) throws IOException
- Specified by:
sign
in interfaceSshAgent
- Throws:
IOException
-
addIdentity
public void addIdentity(KeyPair kp, String comment) throws IOException
- Specified by:
addIdentity
in interfaceSshAgent
- Throws:
IOException
-
removeIdentity
public void removeIdentity(PublicKey key) throws IOException
- Specified by:
removeIdentity
in interfaceSshAgent
- Throws:
IOException
-
removeAllIdentities
public void removeAllIdentities() throws IOException
- Specified by:
removeAllIdentities
in interfaceSshAgent
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceChannel
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
createBuffer
protected Buffer createBuffer(byte cmd)
-
createBuffer
protected Buffer createBuffer(byte cmd, int extraLen)
-
request
protected abstract Buffer request(Buffer buffer) throws IOException
- Throws:
IOException
-
-