Class ConfigFileHostEntryResolver

    • Field Detail

      • delegateHolder

        private final java.util.concurrent.atomic.AtomicReference<HostConfigEntryResolver> delegateHolder
    • Constructor Detail

      • ConfigFileHostEntryResolver

        public ConfigFileHostEntryResolver​(java.nio.file.Path file)
      • ConfigFileHostEntryResolver

        public ConfigFileHostEntryResolver​(java.nio.file.Path file,
                                           java.nio.file.LinkOption... options)
    • Method Detail

      • resolveEffectiveHost

        public HostConfigEntry resolveEffectiveHost​(java.lang.String host,
                                                    int port,
                                                    java.net.SocketAddress localAddress,
                                                    java.lang.String username,
                                                    AttributeRepository context)
                                             throws java.io.IOException
        Description copied from interface: HostConfigEntryResolver
        Invoked when creating a new client session in order to allow for overriding of the original parameters
        Specified by:
        resolveEffectiveHost in interface HostConfigEntryResolver
        Parameters:
        host - The requested host - never null/empty
        port - The requested port
        localAddress - Optional binding endpoint for the local peer
        username - The requested username
        context - An optional "context" provided during the connection request (to be attached to the established session if successfully connected)
        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
        Throws:
        java.io.IOException - If failed to resolve the configuration
      • resolveEffectiveResolver

        protected HostConfigEntryResolver resolveEffectiveResolver​(java.lang.String host,
                                                                   int port,
                                                                   java.lang.String username)
                                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • reloadHostConfigEntries

        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
        Throws:
        java.io.IOException