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

public Class JGitSshConfig

extends Object
implements HostConfigEntryResolver
Class Inheritance
All Implemented Interfaces
org.apache.sshd.client.config.hosts.HostConfigEntryResolver
Static Imports
org.eclipse.jgit.internal.transport.ssh.OpenSshConfigFile.flag, .OpenSshConfigFile.positive

A bridge between a JGit SshConfigStore and the Apache MINA sshd HostConfigEntryResolver.

Field Summary

Modifier and TypeField and Description
private final SshConfigStore

Constructor Summary

AccessConstructor and Description
public
JGitSshConfig(SshConfigStore
to use
store
)

Creates a new JGitSshConfig that will read the config from the given SshConfigStore.

Method Summary

Modifier and TypeMethod and Description
public HostConfigEntry
resolveEffectiveHost(String
The requested host - never null/empty
host
,
int
The requested port
port
,
SocketAddress
Optional binding endpoint for the local peer
localAddress
,
String
The requested username
username
,
String
The requested proxyJump
proxyJump
,
AttributeRepository
An optional "context" provided during the connection request (to be attached to the established session if successfully connected)
attributes
)

Implements org.apache.sshd.client.config.hosts.HostConfigEntryResolver.resolveEffectiveHost.

Invoked when creating a new client session in order to allow for overriding of the original parameters

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

configFileback to summary
private final SshConfigStore configFile

Constructor Detail

JGitSshConfigback to summary
public JGitSshConfig(SshConfigStore store)

Creates a new JGitSshConfig that will read the config from the given SshConfigStore.

Parameters
store:SshConfigStore

to use

Method Detail

resolveEffectiveHostback to summary
public HostConfigEntry resolveEffectiveHost(String host, int port, SocketAddress localAddress, String username, String proxyJump, AttributeRepository attributes) throws IOException

Implements org.apache.sshd.client.config.hosts.HostConfigEntryResolver.resolveEffectiveHost.

Doc from org.apache.sshd.client.config.hosts.HostConfigEntryResolver.resolveEffectiveHost.

Invoked when creating a new client session in order to allow for overriding of the original parameters

Parameters
host:String

The requested host - never null/empty

port:int

The requested port

localAddress:SocketAddress

Optional binding endpoint for the local peer

username:String

The requested username

proxyJump:String

The requested proxyJump

attributes:AttributeRepository

An optional "context" provided during the connection request (to be attached to the established session if successfully connected)

Returns:HostConfigEntry

A HostConfigEntry for the actual target - null if use original parameters

Note

if any identity files are attached to the configuration then they must point to existing locations. This means that any macros such as ~, %d, %h, etc. must be resolved prior to returning the value

Annotations
@Override
Exceptions
IOException:
If failed to resolve the configuration