Top Description Methods
org.eclipse.jgit.transport.sshd.agent

public Interface Connector

extends Closeable
Known Direct Implementers
org.eclipse.jgit.transport.sshd.agent.AbstractConnector
Imports
java.io.Closeable, .IOException

Simple interface for connecting to something and making RPC-style request-reply calls.
Since
6.0
See Also
ConnectorFactory

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if an SSH agent is available and connected, false if no SSH agent is available
connect
()

Connects to an SSH agent if there is one running.

public byte[]

Returns:

the result received
rpc
(byte
to send
command
,
byte[]
to send; must have at least 5 bytes, and must have 5 unused bytes at the front.
message
)

Performs a remote call to the SSH agent and returns the result.

public default byte[]

Returns:

the result received
rpc
(byte
to send
command
)

Performs a remote call sending only a command without any parameters to the SSH agent and returns the result.

Inherited from java.io.Closeable:
close

Method Detail

connectback to summary
public boolean connect() throws IOException

Connects to an SSH agent if there is one running. If called when already connected just returns true.

Returns:boolean

true if an SSH agent is available and connected, false if no SSH agent is available

Exceptions
IOException:
if connecting to the SSH agent failed
rpcback to summary
public byte[] rpc(byte command, byte[] message) throws IOException

Performs a remote call to the SSH agent and returns the result.

Parameters
command:byte

to send

message:byte[]

to send; must have at least 5 bytes, and must have 5 unused bytes at the front.

Returns:byte[]

the result received

Exceptions
IOException:
if an error occurs
rpcback to summary
public default byte[] rpc(byte command) throws IOException

Performs a remote call sending only a command without any parameters to the SSH agent and returns the result.

Parameters
command:byte

to send

Returns:byte[]

the result received

Exceptions
IOException:
if an error occurs