org.marketcetera.util.ws.stateless
Class StatelessServer

java.lang.Object
  extended by org.marketcetera.util.ws.stateless.Node
      extended by org.marketcetera.util.ws.stateless.StatelessServer
Direct Known Subclasses:
Server

public class StatelessServer
extends Node

A server node for stateless communication.

Since:
1.0.0
Version:
$Id: StatelessServer.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
StatelessServer()
          Creates a new server node with the default server host name and port.
StatelessServer(String host, int port)
          Creates a new server node with the given server host name and port.
StatelessServer(String inHost, int inPort, Class<?>... inContextClasses)
          Create a new StatelessServer instance.
 
Method Summary
<T extends StatelessServiceBase>
ServiceInterface
publish(T impl, Class<T> iface)
          Publishes the given service interface, supported by the given implementation, and returns a handle that can be used to stop the interface.
 void stop()
          Shuts down the receiver.
 
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

StatelessServer

public StatelessServer(String inHost,
                       int inPort,
                       Class<?>... inContextClasses)
Create a new StatelessServer instance.

Parameters:
inHost - a String value
inPort - an int value
inContextClasses - a Class<?>... value

StatelessServer

public StatelessServer(String host,
                       int port)
Creates a new server node with the given server host name and port.

Parameters:
host - The host name.
port - The port.

StatelessServer

public StatelessServer()
Creates a new server node with the default server host name and port.

Method Detail

publish

public <T extends StatelessServiceBase> ServiceInterface publish(T impl,
                                                                 Class<T> iface)
Publishes the given service interface, supported by the given implementation, and returns a handle that can be used to stop the interface.

Parameters:
impl - The implementation.
iface - The interface class.
Returns:
The handle.

stop

public void stop()
Shuts down the receiver.



Copyright © 2012. All Rights Reserved.