org.marketcetera.util.ws.stateless
Class Node

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

public class Node
extends Object

A communication endpoint.

Since:
1.0.0
Version:
$Id: Node.java 16154 2012-07-14 16:34:05Z colin $
Author:
tlerios@marketcetera.com

Field Summary
static String DEFAULT_HOST
          The default host name for the server and to which the client connects.
static int DEFAULT_PORT
          The default port on which the server listens and to which the client connects.
 
Constructor Summary
protected Node()
          Creates a new communication node with the default host name and port.
protected Node(String host, int port)
          Creates a new communication node with the given host name and port.
 
Method Summary
protected  String getConnectionUrl(Class<?> iface)
          Returns the connection URL for the given service interface.
 String getHost()
          Returns the receiver's host name.
 NodeId getId()
          Returns the receiver's node ID.
 int getPort()
          Returns the receiver's port.
 void setHost(String host)
          Sets the receiver's host name to the given one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PORT

public static final int DEFAULT_PORT
The default port on which the server listens and to which the client connects.

See Also:
Constant Field Values

DEFAULT_HOST

public static final String DEFAULT_HOST
The default host name for the server and to which the client connects.

See Also:
Constant Field Values
Constructor Detail

Node

protected Node(String host,
               int port)
Creates a new communication node with the given host name and port.

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

Node

protected Node()
Creates a new communication node with the default host name and port.

Method Detail

setHost

public void setHost(String host)
Sets the receiver's host name to the given one.

Parameters:
host - The host name.

getHost

public String getHost()
Returns the receiver's host name.

Returns:
The host name.

getPort

public int getPort()
Returns the receiver's port.

Returns:
The port.

getId

public NodeId getId()
Returns the receiver's node ID.

Returns:
The node ID.

getConnectionUrl

protected String getConnectionUrl(Class<?> iface)
Returns the connection URL for the given service interface.

Parameters:
iface - The interface.
Returns:
The URL.


Copyright © 2012. All Rights Reserved.