org.marketcetera.util.ws.stateful
Class Server<T>

java.lang.Object
  extended by org.marketcetera.util.ws.stateless.Node
      extended by org.marketcetera.util.ws.stateless.StatelessServer
          extended by org.marketcetera.util.ws.stateful.Server<T>

public class Server<T>
extends StatelessServer

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 16154 2012-07-14 16:34:05Z colin $
Author:
tlerios@marketcetera.com

Field Summary
 
Fields inherited from class org.marketcetera.util.ws.stateless.Node
DEFAULT_HOST, DEFAULT_PORT
 
Constructor Summary
Server()
          Creates a new server node with the default server host name and port, and no authenticator or session manager.
Server(Authenticator authenticator, SessionManager<T> sessionManager)
          Creates a new server node with the default server host name and port, and the given authenticator and session manager.
Server(String host, int port, Authenticator authenticator, SessionManager<T> sessionManager)
          Creates a new server node with the given server host name, port, authenticator, and session manager.
Server(String inHost, int inPort, Authenticator inAuthenticator, SessionManager<T> inSessionManager, Class<?>... inContextClasses)
          Create a new Server instance.
 
Method Summary
 Authenticator getAuthenticator()
          Returns the receiver's authenticator.
 SessionManager<T> getSessionManager()
          Returns the receiver's session manager.
 void stop()
          Shuts down the receiver.
 
Methods inherited from class org.marketcetera.util.ws.stateless.StatelessServer
publish
 
Methods inherited from class org.marketcetera.util.ws.stateless.Node
getConnectionUrl, getHost, getId, getPort, setHost
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Server

public Server(String host,
              int port,
              Authenticator authenticator,
              SessionManager<T> 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<T> inSessionManager,
              Class<?>... inContextClasses)
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
inContextClasses - a Class<?>... value or null

Server

public Server(Authenticator authenticator,
              SessionManager<T> 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<T> getSessionManager()
Returns the receiver's session manager.

Returns:
The session manager, which may be null.

stop

public void stop()
Description copied from class: StatelessServer
Shuts down the receiver.

Overrides:
stop in class StatelessServer


Copyright © 2012. All Rights Reserved.