public class ConfigFileHostEntryResolver extends ModifiableFileWatcher implements HostConfigEntryResolver
Modifier and Type | Field and Description |
---|---|
private java.util.concurrent.atomic.AtomicReference<HostConfigEntryResolver> |
delegateHolder |
options, STRICTLY_PROHIBITED_FILE_PERMISSION
log
EMPTY
Constructor and Description |
---|
ConfigFileHostEntryResolver(java.nio.file.Path file) |
ConfigFileHostEntryResolver(java.nio.file.Path file,
java.nio.file.LinkOption... options) |
Modifier and Type | Method and Description |
---|---|
protected java.util.List<HostConfigEntry> |
reloadHostConfigEntries(java.nio.file.Path path,
java.lang.String host,
int port,
java.lang.String username) |
HostConfigEntry |
resolveEffectiveHost(java.lang.String host,
int port,
java.net.SocketAddress localAddress,
java.lang.String username,
AttributeRepository context)
Invoked when creating a new client session in order to allow for overriding of the original parameters
|
protected HostConfigEntryResolver |
resolveEffectiveResolver(java.lang.String host,
int port,
java.lang.String username) |
checkReloadRequired, exists, getPath, lastModified, resetReloadAttributes, size, toPathResource, toPathResource, toString, updateReloadAttributes, validateStrictConfigFilePermissions
getSimplifiedLogger
private final java.util.concurrent.atomic.AtomicReference<HostConfigEntryResolver> delegateHolder
public ConfigFileHostEntryResolver(java.nio.file.Path file)
public ConfigFileHostEntryResolver(java.nio.file.Path file, java.nio.file.LinkOption... options)
public HostConfigEntry resolveEffectiveHost(java.lang.String host, int port, java.net.SocketAddress localAddress, java.lang.String username, AttributeRepository context) throws java.io.IOException
HostConfigEntryResolver
resolveEffectiveHost
in interface HostConfigEntryResolver
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 valuejava.io.IOException
- If failed to resolve the configurationprotected HostConfigEntryResolver resolveEffectiveResolver(java.lang.String host, int port, java.lang.String username) throws java.io.IOException
java.io.IOException
protected java.util.List<HostConfigEntry> reloadHostConfigEntries(java.nio.file.Path path, java.lang.String host, int port, java.lang.String username) throws java.io.IOException
java.io.IOException