Top Description Fields Constructors Methods
org.eclipse.jgit.internal.transport.sshd.agent.connector

public Class PageantConnector

extends AbstractConnector
Class Inheritance
Imports
java.io.IOException, org.eclipse.jgit.transport.sshd.agent.AbstractConnector, .ConnectorFactory.ConnectorDescriptor

A connector using Pageant's shared memory IPC mechanism.

Field Summary

Modifier and TypeField and Description
public static final ConnectorFactory.ConnectorDescriptor
private final PageantLibrary
Inherited from org.eclipse.jgit.transport.sshd.agent.AbstractConnector:
DEFAULT_MAX_REPLY_LENGTH

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements java.io.Closeable.close.

Closes this stream and releases any system resources associated with it.

public boolean
connect()

Implements org.eclipse.jgit.transport.sshd.agent.Connector.connect.

Connects to an SSH agent if there is one running.

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.eclipse.jgit.transport.sshd.agent.Connector.rpc.

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

Inherited from org.eclipse.jgit.transport.sshd.agent.AbstractConnector:
getMaximumMessageLengthprepareMessagetoLength

Field Detail

DESCRIPTORback to summary
public static final ConnectorFactory.ConnectorDescriptor DESCRIPTOR

ConnectorDescriptor for the PageantConnector.

libback to summary
private final PageantLibrary lib

Constructor Detail

PageantConnectorback to summary
public PageantConnector()

Creates a new PageantConnector.

Method Detail

closeback to summary
public void close() throws IOException

Implements java.io.Closeable.close.

Doc from java.io.Closeable.close.

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 AutoCloseable#close(), cases where the close may fail require careful attention. It is strongly advised to relinquish the underlying resources and to internally mark the Closeable as closed, prior to throwing the IOException.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs
connectback to summary
public boolean connect() throws IOException

Implements org.eclipse.jgit.transport.sshd.agent.Connector.connect.

Doc from org.eclipse.jgit.transport.sshd.agent.Connector.connect.

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

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

Implements org.eclipse.jgit.transport.sshd.agent.Connector.rpc.

Doc from org.eclipse.jgit.transport.sshd.agent.Connector.rpc.

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

Annotations
@Override
Exceptions
IOException:
if an error occurs