Class Node
- java.lang.Object
-
- org.marketcetera.util.ws.stateless.Node
-
- All Implemented Interfaces:
UsesPort
- Direct Known Subclasses:
StatelessClient,StatelessServer
public class Node extends Object implements UsesPort
A communication endpoint.- Since:
- 1.0.0
- Version:
- $Id: Node.java 17757 2018-11-13 20:41:13Z colin $
- Author:
- tlerios@marketcetera.com
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_CLIENT_HOSTThe default host name for the clientstatic intDEFAULT_PORTThe default port on which the server listens and to which the client connects.static StringDEFAULT_SERVER_HOSTThe default host name for the serverprivate Stringhostnode host valueprivate StringnodeDescriptionnode description valueprivate NodeIdnodeIdnode id for this nodeprivate intportnode port value
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetConnectionUrl(Class<?> inInterfaceClazz)Returns the connection URL for the given service interface.StringgetHost()Returns the receiver's host name.NodeIdgetId()Returns the receiver's node ID.StringgetNodeDescription()Get the nodeDescription value.intgetPort()Returns the receiver's port.Collection<PortDescriptor>getPortDescriptors()Get the ports that this implementor uses.voidsetHost(String inHost)Sets the receiver's host name to the given one.voidsetNodeDescription(String inNodeDescription)Sets the nodeDescription value.voidsetPort(int inPort)Sets the port value.
-
-
-
Field Detail
-
host
private String host
node host value
-
port
private int port
node port value
-
nodeId
private final NodeId nodeId
node id for this node
-
nodeDescription
private String nodeDescription
node description value
-
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_SERVER_HOST
public static final String DEFAULT_SERVER_HOST
The default host name for the server- See Also:
- Constant Field Values
-
DEFAULT_CLIENT_HOST
public static final String DEFAULT_CLIENT_HOST
The default host name for the client- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Node
protected Node(String inHost, int inPort)
Creates a new communication node with the given host name and port.- Parameters:
inHost- aStringvalueinPort- anintvalue
-
Node
protected Node()
Creates a new communication node with the default host name and port.
-
-
Method Detail
-
setHost
public void setHost(String inHost)
Sets the receiver's host name to the given one.- Parameters:
inHost- aStringvalue
-
getHost
public String getHost()
Returns the receiver's host name.- Returns:
- a
Stringvalue
-
getPort
public int getPort()
Returns the receiver's port.- Returns:
- an
intvalue
-
setPort
public void setPort(int inPort)
Sets the port value.- Parameters:
inPort- anintvalue
-
getId
public NodeId getId()
Returns the receiver's node ID.- Returns:
- a
NodeIdvalue
-
getNodeDescription
public String getNodeDescription()
Get the nodeDescription value.- Returns:
- a
Stringvalue
-
setNodeDescription
public void setNodeDescription(String inNodeDescription)
Sets the nodeDescription value.- Parameters:
inNodeDescription- aStringvalue
-
getPortDescriptors
public Collection<PortDescriptor> getPortDescriptors()
Description copied from interface:UsesPortGet the ports that this implementor uses.- Specified by:
getPortDescriptorsin interfaceUsesPort- Returns:
- a
Collection<PortDescriptor>value
-
-