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

public Class JGitSshAgentFactory

extends Object
implements SshAgentFactory
Class Inheritance
All Implemented Interfaces
org.apache.sshd.agent.SshAgentFactory
Imports
java.io.File, .IOException, java.util.Collections, .List, org.apache.sshd.agent.SshAgent, .SshAgentFactory, .SshAgentServer, org.apache.sshd.client.config.hosts.HostConfigEntry, org.apache.sshd.common.FactoryManager, org.apache.sshd.common.channel.ChannelFactory, org.apache.sshd.common.session.ConnectionService, .Session, org.eclipse.jgit.annotations.NonNull, org.eclipse.jgit.internal.transport.sshd.JGitClientSession, org.eclipse.jgit.transport.SshConstants, org.eclipse.jgit.transport.sshd.agent.ConnectorFactory

A factory for creating SshAgentClients.

Field Summary

Modifier and TypeField and Description
private final ConnectorFactory
private final File

Constructor Summary

AccessConstructor and Description
public
JGitSshAgentFactory(ConnectorFactory factory, File
for obtaining the current local user's home directory
homeDir
)

Creates a new JGitSshAgentFactory.

Method Summary

Modifier and TypeMethod and Description
public SshAgent
createClient(Session
the Session the SshAgent is to be created for; may be null
session
,
FactoryManager
The FactoryManager instance
manager
)

Implements org.apache.sshd.agent.SshAgentFactory.createClient.

Create an SshAgent that can be used on the client side by the authentication process to send possible keys.

public SshAgentServer
createServer(ConnectionService service)

Implements org.apache.sshd.agent.SshAgentFactory.createServer.

Create the server side that will be used by other SSH clients.

public List<ChannelFactory>
getChannelForwardingFactories(FactoryManager
The FactoryManager through which the request is made
manager
)

Implements org.apache.sshd.agent.SshAgentFactory.getChannelForwardingFactories.

The channels are requested by the ssh server when forwarding a client request.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

factoryback to summary
private final ConnectorFactory factory
Annotations
@NonNull
homeDirback to summary
private final File homeDir

Constructor Detail

JGitSshAgentFactoryback to summary
public JGitSshAgentFactory(ConnectorFactory factory, File homeDir)

Creates a new JGitSshAgentFactory.

Parameters
factory:ConnectorFactory

JGitSshAgentFactory to wrap

homeDir:File

for obtaining the current local user's home directory

Method Detail

createClientback to summary
public SshAgent createClient(Session session, FactoryManager manager) throws IOException

Implements org.apache.sshd.agent.SshAgentFactory.createClient.

Doc from org.apache.sshd.agent.SshAgentFactory.createClient.

Create an SshAgent that can be used on the client side by the authentication process to send possible keys.

Parameters
session:Session

the Session the SshAgent is to be created for; may be null

manager:FactoryManager

The FactoryManager instance

Returns:SshAgent

The SshAgent instance, or null if no SSH agent shall be used

Annotations
@Override
Exceptions
IOException:
If failed to create the client
createServerback to summary
public SshAgentServer createServer(ConnectionService service) throws IOException

Implements org.apache.sshd.agent.SshAgentFactory.createServer.

Doc from org.apache.sshd.agent.SshAgentFactory.createServer.

Create the server side that will be used by other SSH clients. It will usually create a channel that will forward the requests to the original client.

Parameters
service:ConnectionService

The ConnectionService to use

Returns:SshAgentServer

The SshAgentServer instance

Annotations
@Override
Exceptions
IOException:
If failed to create the server
getChannelForwardingFactoriesback to summary
public List<ChannelFactory> getChannelForwardingFactories(FactoryManager manager)

Implements org.apache.sshd.agent.SshAgentFactory.getChannelForwardingFactories.

Doc from org.apache.sshd.agent.SshAgentFactory.getChannelForwardingFactories.

The channels are requested by the ssh server when forwarding a client request. The channel will receive agent requests and needs to forward them to the agent, either local or through another proxy.

Parameters
manager:FactoryManager

The FactoryManager through which the request is made

Returns:List<ChannelFactory>

The ChannelFactory-ies used to create channels for agent forwarding on the client side. If null or empty, agent forwarding is not available.

Annotations
@Override