| Modifier and Type | Field and Description |
|---|---|
| private AtomicBoolean | |
| public static final ConnectorFactory. | |
| private static UnixSockets | |
| private static boolean | |
| private static final Logger | |
| private volatile int | |
| private final String |
| Access | Constructor and Description |
|---|---|
| public | UnixDomainSocketConnector(String
to use; if socketFile)null or empty, use environment variable
SSH_AUTH_SOCKCreates a new instance. |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized void | close()
Implements java. Closes this stream and releases any system resources associated with it. |
| public boolean | connect()
Implements org. Connects to an SSH agent if there is one running. |
| private static synchronized UnixSockets | |
| private int | |
| private void | |
| public byte[] | rpc(byte
to send command, byte[] to send; must have at least 5 bytes, and must have 5 unused
bytes at the front. message)Implements org. Performs a remote call to the SSH agent and returns the result. |
| private void |
| connected | back to summary |
|---|---|
| private AtomicBoolean connected | |
| DESCRIPTOR | back to summary |
|---|---|
| public static final ConnectorFactory. | |
| library | back to summary |
|---|---|
| private static UnixSockets library | |
| libraryLoaded | back to summary |
|---|---|
| private static boolean libraryLoaded | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| socketFd | back to summary |
|---|---|
| private volatile int socketFd | |
| socketFile | back to summary |
|---|---|
| private final String socketFile | |
| UnixDomainSocketConnector | back to summary |
|---|---|
| public UnixDomainSocketConnector(String socketFile) Creates a new instance.
| |
| close | back to summary |
|---|---|
| public synchronized void close() throws IOException Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| connect | back to summary |
|---|---|
| public boolean connect() throws IOException Implements org. Doc from org. Connects to an SSH agent if there is one running. If called when already
connected just returns
| |
| getLibrary | back to summary |
|---|---|
| private static synchronized UnixSockets getLibrary() | |
| read | back to summary |
|---|---|
| private int read(int fd, byte[] buffer, int offset, int length) throws IOException | |
| readFully | back to summary |
|---|---|
| private void readFully(int fd, byte[] data) throws IOException | |
| rpc | back to summary |
|---|---|
| public byte[] rpc(byte command, byte[] message) throws IOException Implements org. Doc from org. Performs a remote call to the SSH agent and returns the result.
| |
| writeFully | back to summary |
|---|---|
| private void writeFully(int fd, byte[] message) throws IOException | |