org.apache.sshd.agent
Class AgentClient
java.lang.Object
java.lang.Thread
org.apache.sshd.agent.AgentClient
- All Implemented Interfaces:
- Runnable, SshAgent
public class AgentClient
- extends Thread
- implements SshAgent
A client for a remote SSH agent
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
AgentClient
public AgentClient(String authSocket)
throws IOException
- Throws:
IOException
run
public void run()
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread
messageReceived
protected void messageReceived(Buffer buffer)
throws Exception
- Throws:
Exception
getIdentities
public List<SshAgent.Pair<PublicKey,String>> getIdentities()
throws IOException
- Specified by:
getIdentities
in interface SshAgent
- Throws:
IOException
sign
public byte[] sign(PublicKey key,
byte[] data)
throws IOException
- Specified by:
sign
in interface SshAgent
- Throws:
IOException
addIdentity
public void addIdentity(KeyPair key,
String comment)
throws IOException
- Specified by:
addIdentity
in interface SshAgent
- Throws:
IOException
removeIdentity
public void removeIdentity(PublicKey key)
throws IOException
- Specified by:
removeIdentity
in interface SshAgent
- Throws:
IOException
removeAllIdentities
public void removeAllIdentities()
throws IOException
- Specified by:
removeAllIdentities
in interface SshAgent
- Throws:
IOException
close
public void close()
- Specified by:
close
in interface SshAgent
createBuffer
protected Buffer createBuffer(byte cmd)
request
protected Buffer request(Buffer buffer)
throws IOException
- Throws:
IOException
Copyright © 2008-2012 Apache Software Foundation. All Rights Reserved.