Class Server<SessionClazz>

  • All Implemented Interfaces:
    ServerProvider<SessionClazz>, UsesPort

    public class Server<SessionClazz>
    extends StatelessServer
    implements ServerProvider<SessionClazz>
    A server node for stateful communication. Its (optional) authenticator checks credentials and its (optional) session manager maintains active sessions.
    Since:
    1.0.0
    Version:
    $Id: Server.java 17411 2017-04-28 14:50:38Z colin $
    Author:
    tlerios@marketcetera.com
    • Constructor Detail

      • Server

        public Server​(String host,
                      int port,
                      Authenticator authenticator,
                      SessionManager<SessionClazz> sessionManager)
        Creates a new server node with the given server host name, port, authenticator, and session manager.
        Parameters:
        host - The host name.
        port - The port.
        authenticator - The authenticator, which may be null.
        sessionManager - The session manager, which may be null.
      • Server

        public Server​(String inHost,
                      int inPort,
                      Authenticator inAuthenticator,
                      SessionManager<SessionClazz> inSessionManager,
                      ContextClassProvider inContextClassProvider)
        Create a new Server instance.
        Parameters:
        inHost - a String value
        inPort - an int value
        inAuthenticator - an Authenticator value or null
        inSessionManager - a SessionManager<T> value or null
        inContextClassProvider - a ContextClassProvider value or null
      • Server

        public Server​(Authenticator authenticator,
                      SessionManager<SessionClazz> sessionManager)
        Creates a new server node with the default server host name and port, and the given authenticator and session manager.
        Parameters:
        authenticator - The authenticator, which may be null.
        sessionManager - The session manager, which may be null.
      • Server

        public Server()
        Creates a new server node with the default server host name and port, and no authenticator or session manager.
    • Method Detail

      • getAuthenticator

        public Authenticator getAuthenticator()
        Returns the receiver's authenticator.
        Returns:
        The authenticator, which may be null.
      • getSessionManager

        public SessionManager<SessionClazz> getSessionManager()
        Returns the receiver's session manager.
        Returns:
        The session manager, which may be null.
      • getAuthService

        private ServiceInterface getAuthService()
        Returns the receiver's authentication service interface.
        Returns:
        The interface, which may be null.