Interface HostConfigEntryResolver
- All Known Implementing Classes:
ConfigFileHostEntryResolver, DefaultConfigFileHostEntryResolver
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HostConfigEntryResolverAn "empty" implementation that does not resolve any entry - i.e., uses the original entry as-is -
Method Summary
Modifier and TypeMethodDescriptionresolveEffectiveHost(String host, int port, SocketAddress localAddress, String username, String proxyJump, AttributeRepository context) Invoked when creating a new client session in order to allow for overriding of the original parameters
-
Field Details
-
EMPTY
An "empty" implementation that does not resolve any entry - i.e., uses the original entry as-is
-
-
Method Details
-
resolveEffectiveHost
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- The requested host - nevernull/emptyport- The requested portlocalAddress- Optional binding endpoint for the local peerusername- The requested usernameproxyJump- The requested proxyJumpcontext- An optional "context" provided during the connection request (to be attached to the established session if successfully connected)- Returns:
- A
HostConfigEntryfor the actual target -nullif 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 - Throws:
IOException- If failed to resolve the configuration
-