Class Factory
java.lang.Object
org.eclipse.jgit.internal.transport.sshd.agent.connector.Factory
- All Implemented Interfaces:
ConnectorFactory
An
ConnectorFactory for connecting to an OpenSSH SSH agent.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jgit.transport.sshd.agent.ConnectorFactory
ConnectorFactory.ConnectorDescriptor -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a newConnector.Tells what kind ofConnectorthisConnectorFactorycreates ifConnectorFactory.create(String, File)is called withidentityAgent == null.getName()Retrieves a name for this factory.Tells which kinds of SSH agents thisConnectorFactorysupports.booleanTells whether thisConnectorFactoryis applicable on the currently running platform.
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
Factory
public Factory()
-
-
Method Details
-
create
Description copied from interface:ConnectorFactoryCreates a newConnector.- Specified by:
createin interfaceConnectorFactory- Parameters:
identityAgent- identifies the wanted agent connection; ifnull, the factory is free to provide aConnectorto a default agent. The value will typically come from theIdentityAgentsetting in~/.ssh/config.homeDir- the current local user's home directory as configured in theSshdSessionFactory- Returns:
- a new
Connector - Throws:
IOException- if no connector can be created
-
isSupported
public boolean isSupported()Description copied from interface:ConnectorFactoryTells whether thisConnectorFactoryis applicable on the currently running platform.- Specified by:
isSupportedin interfaceConnectorFactory- Returns:
trueif the factory can be used,falseotherwise
-
getName
Description copied from interface:ConnectorFactoryRetrieves a name for this factory.- Specified by:
getNamein interfaceConnectorFactory- Returns:
- the name
-
getSupportedConnectors
Tells which kinds of SSH agents thisConnectorFactorysupports.An implementation of this method should document the possible values it returns.
This factory returns on Windows a
ConnectorDescriptorfor the internal name "pageant"; on Unix one for "SSH_AUTH_SOCK".- Specified by:
getSupportedConnectorsin interfaceConnectorFactory- Returns:
- an immutable collection of
ConnectorFactory.ConnectorDescriptors, includingConnectorFactory.getDefaultConnector()and not including a descriptor for internal name "none"
-
getDefaultConnector
Description copied from interface:ConnectorFactoryTells what kind ofConnectorthisConnectorFactorycreates ifConnectorFactory.create(String, File)is called withidentityAgent == null.- Specified by:
getDefaultConnectorin interfaceConnectorFactory- Returns:
- a
ConnectorFactory.ConnectorDescriptorfor the default connector
-