Interface FactoryManager

    • Field Detail

      • WINDOW_SIZE

        static final java.lang.String WINDOW_SIZE
        Key used to retrieve the value of the channel window size in the configuration properties map.
        See Also:
        DEFAULT_WINDOW_SIZE, Constant Field Values
      • WINDOW_TIMEOUT

        static final java.lang.String WINDOW_TIMEOUT
        Key used to retrieve timeout (msec.) to wait for data to become available when reading from a channel. If not set or non-positive then infinite value is assumed
        See Also:
        DEFAULT_WINDOW_TIMEOUT, Constant Field Values
      • DEFAULT_NIO_WORKERS

        static final int DEFAULT_NIO_WORKERS
        Default number of worker threads to use if none set - the number of available processors + 1
      • AUTH_TIMEOUT

        static final java.lang.String AUTH_TIMEOUT
        Key used to retrieve the value of the timeout after which it will close the connection if the other side has not been authenticated - in milliseconds.
        See Also:
        DEFAULT_AUTH_TIMEOUT, Constant Field Values
      • DEFAULT_AUTH_TIMEOUT

        static final long DEFAULT_AUTH_TIMEOUT
        Default value for "auth-timeout" if none set
      • IDLE_TIMEOUT

        static final java.lang.String IDLE_TIMEOUT
        Key used to retrieve the value of idle timeout after which it will close the connection - in milliseconds.
        See Also:
        DEFAULT_IDLE_TIMEOUT, Constant Field Values
      • DEFAULT_IDLE_TIMEOUT

        static final long DEFAULT_IDLE_TIMEOUT
        Default value for "idle-timeout" if none set
      • NIO2_READ_TIMEOUT

        static final java.lang.String NIO2_READ_TIMEOUT
        Key used to retrieve the value of the socket read timeout for NIO2 session implementation - in milliseconds.
        See Also:
        DEFAULT_NIO2_READ_TIMEOUT, Constant Field Values
      • DEFAULT_NIO2_READ_TIMEOUT

        static final long DEFAULT_NIO2_READ_TIMEOUT
        Default value for "nio2-read-timeout" if none set
      • DEFAULT_NIO2_MIN_WRITE_TIMEOUT

        static final long DEFAULT_NIO2_MIN_WRITE_TIMEOUT
        Default value for "nio2-min-write-timeout" if none set
      • DISCONNECT_TIMEOUT

        static final java.lang.String DISCONNECT_TIMEOUT
        Key used to retrieve the value of the disconnect timeout which is used when a disconnection is attempted. If the disconnect message has not been sent before the timeout, the underlying socket will be forcibly closed - in milliseconds.
        See Also:
        DEFAULT_DISCONNECT_TIMEOUT, Constant Field Values
      • DEFAULT_DISCONNECT_TIMEOUT

        static final long DEFAULT_DISCONNECT_TIMEOUT
        Default value for "disconnect-timeout" if none set
      • CHANNEL_CLOSE_TIMEOUT

        static final java.lang.String CHANNEL_CLOSE_TIMEOUT
        Key used to configure the timeout used when writing a close request on a channel. If the message can not be written before the specified timeout elapses, the channel will be immediately closed. In milliseconds.
        See Also:
        DEFAULT_AUTH_TIMEOUT, Constant Field Values
      • DEFAULT_CHANNEL_CLOSE_TIMEOUT

        static final long DEFAULT_CHANNEL_CLOSE_TIMEOUT
        Default "channel-close-timeout" value if none set
      • DEFAULT_STOP_WAIT_TIME

        static final long DEFAULT_STOP_WAIT_TIME
        Default value for "stop-wait-time" if none specified
      • SOCKET_BACKLOG

        static final java.lang.String SOCKET_BACKLOG
        Socket backlog. See AsynchronousServerSocketChannel.bind(java.net.SocketAddress, int)
        See Also:
        Constant Field Values
      • SOCKET_KEEPALIVE

        static final java.lang.String SOCKET_KEEPALIVE
        Socket keep-alive. See StandardSocketOptions.SO_KEEPALIVE
        See Also:
        Constant Field Values
      • SOCKET_SNDBUF

        static final java.lang.String SOCKET_SNDBUF
        Socket send buffer size. See StandardSocketOptions.SO_SNDBUF
        See Also:
        Constant Field Values
      • SOCKET_RCVBUF

        static final java.lang.String SOCKET_RCVBUF
        Socket receive buffer size. See StandardSocketOptions.SO_RCVBUF
        See Also:
        Constant Field Values
      • SOCKET_REUSEADDR

        static final java.lang.String SOCKET_REUSEADDR
        Socket reuse address. See StandardSocketOptions.SO_REUSEADDR
        See Also:
        Constant Field Values
      • SOCKET_LINGER

        static final java.lang.String SOCKET_LINGER
        Socket linger. See StandardSocketOptions.SO_LINGER
        See Also:
        Constant Field Values
      • TCP_NODELAY

        static final java.lang.String TCP_NODELAY
        Socket tcp no-delay. See StandardSocketOptions.TCP_NODELAY
        See Also:
        Constant Field Values
      • DEFAULT_VERSION

        static final java.lang.String DEFAULT_VERSION
        The default REPORTED_VERSION of getVersion() if the built-in version information cannot be accessed
        See Also:
        Constant Field Values
      • MAX_IDENTIFICATION_SIZE

        static final java.lang.String MAX_IDENTIFICATION_SIZE
        Maximum allowed size of the initial identification text sent during the handshake
        See Also:
        Constant Field Values
      • REKEY_BYTES_LIMIT

        static final java.lang.String REKEY_BYTES_LIMIT
        Key re-exchange will be automatically performed after the session has sent or received the given amount of bytes. If non-positive, then disabled. The default value is 1073741824L
        See Also:
        Constant Field Values
      • REKEY_TIME_LIMIT

        static final java.lang.String REKEY_TIME_LIMIT
        Key re-exchange will be automatically performed after the specified amount of time has elapsed since the last key exchange - in milliseconds. If non-positive then disabled. The default value is 3600000L
        See Also:
        Constant Field Values
      • REKEY_PACKETS_LIMIT

        static final java.lang.String REKEY_PACKETS_LIMIT
        Key re-exchange will be automatically performed after the specified number of packets has been exchanged - positive 64-bit value. If non-positive then disabled. The default is 2147483648L
        See Also:
        Constant Field Values
      • REKEY_BLOCKS_LIMIT

        static final java.lang.String REKEY_BLOCKS_LIMIT
        Key re-exchange will be automatically performed after the specified number of cipher blocks has been processed - positive 64-bit value. If non-positive then disabled. The default is calculated according to RFC4344 section 3.2
        See Also:
        Constant Field Values
      • IGNORE_MESSAGE_VARIANCE

        static final java.lang.String IGNORE_MESSAGE_VARIANCE
        The variance to be used around the configured "ignore-message-frequency" value in order to avoid insertion at a set frequency. If zero, then exact frequency is used. If negative, then the absolute value is used. If greater or equal to the frequency, then assumed to be zero - i.e., no variance
        See Also:
        RFC4251 section 9.3.1, Constant Field Values
      • IGNORE_MESSAGE_SIZE

        static final java.lang.String IGNORE_MESSAGE_SIZE
        Minimum size of SSH_MSG_IGNORE payload to send if feature enabled. If non-positive then no message is sent. Otherwise, the actual size is between this size and twice its value
        See Also:
        RFC4251 section 9.3.1, Constant Field Values
      • AGENT_FORWARDING_TYPE_IETF

        static final java.lang.String AGENT_FORWARDING_TYPE_IETF
        The agent forwarding type defined by IETF (https://tools.ietf.org/html/draft-ietf-secsh-agent-02).
        See Also:
        Constant Field Values
      • AGENT_FORWARDING_TYPE_OPENSSH

        static final java.lang.String AGENT_FORWARDING_TYPE_OPENSSH
        The agent forwarding type defined by OpenSSH.
        See Also:
        Constant Field Values
    • Method Detail

      • getVersion

        java.lang.String getVersion()
        An upper case string identifying the version of the software used on client or server side. This version includes the name and version of the software and usually looks like this: SSHD-CORE-1.0
        Returns:
        the version of the software
      • getRandomFactory

        Factory<Random> getRandomFactory()
        Retrieve the Random factory to be used.
        Returns:
        The Random factory, never null
      • getChannelFactories

        java.util.List<ChannelFactory> getChannelFactories()
        Retrieve the list of named factories for Channel objects.
        Returns:
        A list of ChannelFactory-ies, never null
      • getScheduledExecutorService

        java.util.concurrent.ScheduledExecutorService getScheduledExecutorService()
        Retrieve the ScheduledExecutorService to be used.
        Returns:
        The ScheduledExecutorService, never null
      • getForwardingFilter

        ForwardingFilter getForwardingFilter()
        Retrieve the ForwardingFilter to be used by the SSH server. If no filter has been configured (i.e. this method returns null), then all forwarding requests will be rejected.
        Returns:
        The ForwardingFilter or null
      • getFileSystemFactory

        FileSystemFactory getFileSystemFactory()
        Retrieve the FileSystemFactory to be used to traverse the file system.
        Returns:
        a valid FileSystemFactory instance or null if file based interactions are not supported on this server
      • getServiceFactories

        java.util.List<ServiceFactory> getServiceFactories()
        Retrieve the list of SSH Service factories.
        Returns:
        a list of named Service factories, never null
      • getGlobalRequestHandlers

        java.util.List<RequestHandler<ConnectionService>> getGlobalRequestHandlers()
        Retrieve the list of global request handlers.
        Returns:
        a list of named GlobalRequestHandler
      • resolveAttribute

        default <T> T resolveAttribute​(AttributeRepository.AttributeKey<T> key)
        Description copied from interface: AttributeRepository
        Attempts to resolve the associated value by going up the store's hierarchy (if any)
        Specified by:
        resolveAttribute in interface AttributeRepository
        Type Parameters:
        T - The generic attribute type
        Parameters:
        key - The key of the attribute; must not be null.
        Returns:
        null if there is no value associated with the specified key either in this repository or any of its ancestors (if any available)
      • resolveAttribute

        static <T> T resolveAttribute​(FactoryManager manager,
                                      AttributeRepository.AttributeKey<T> key)
        Type Parameters:
        T - The generic attribute type
        Parameters:
        manager - The FactoryManager - ignored if null
        key - The attribute key - never null
        Returns:
        Associated value - null if not found