@FunctionalInterface public interface HostConfigEntryResolver
| Modifier and Type | Field and Description |
|---|---|
static HostConfigEntryResolver |
EMPTY
An "empty" implementation that does not resolve any entry - i.e., uses the original entry as-is
|
| Modifier and Type | Method and Description |
|---|---|
HostConfigEntry |
resolveEffectiveHost(String host,
int port,
SocketAddress localAddress,
String username,
AttributeRepository context)
Invoked when creating a new client session in order to allow for overriding of the original parameters
|
static final HostConfigEntryResolver EMPTY
HostConfigEntry resolveEffectiveHost(String host, int port, SocketAddress localAddress, String username, AttributeRepository context) throws IOException
host - The requested host - never null/emptyport - The requested portlocalAddress - Optional binding endpoint for the local peerusername - The requested usernamecontext - An optional "context" provided during the connection request (to be attached to
the established session if successfully connected)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 valueIOException - If failed to resolve the configurationCopyright © 2018–2020 The Apache Software Foundation. All rights reserved.