Top Fields Methods
org.apache.sshd.client.config.hosts

public Interface HostConfigEntryResolver

Known Direct Implementers
org.apache.sshd.client.config.hosts.ConfigFileHostEntryResolver
Annotations
@FunctionalInterface
Imports
java.io.IOException, java.net.SocketAddress, org.apache.sshd.common.AttributeRepository

Author
Apache MINA SSHD Project
See Also
ssh_config

Field Summary

Modifier and TypeField and Description
public static final HostConfigEntryResolver
EMPTY

An "empty" implementation that does not resolve any entry - i.e., uses the original entry as-is

Method Summary

Modifier and TypeMethod and Description
public HostConfigEntry

Returns:

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

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)
context
)

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

Field Detail

EMPTYback to summary
public static final HostConfigEntryResolver EMPTY

An "empty" implementation that does not resolve any entry - i.e., uses the original entry as-is

Method Detail

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

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

context: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

Exceptions
IOException:
If failed to resolve the configuration