Class
Tree
          
SUMMARY: INNER | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD
 

com.newstep.solid.netio.packet
Class PacketChannelEndpoint
com.newstep.solid.netio.ChannelEndpoint
  |
  +--com.newstep.solid.netio.packet.PacketChannelEndpoint

public class PacketChannelEndpoint      
represents a PacketChannelEndpoint used to indicate where to send packets
from or to.
 
Links:
Generalization Generalization Link
to Class ChannelEndpoint
represents a PacketChannelEndpoint used to indicate where to send packets
from or to.
 
 

Field Summary
int
String
private String
private int
private final static String
Constructor Summary
public void
PacketChannelEndpoint(String host, Integer port)
public void
Method Summary
public String
public int
public InetSocketAddress
public static PacketChannelEndpoint
parse(String endpointString)
public void
setHost(String host)
public void
setPort(Integer port)
public void
setSocketAddress(InetSocketAddress socketAddress)
public String
Field Detail
host
private String host
the endpoint host
Multiplicity:
1
 

host
String host
the endpoint host
 

port
int port
the endpoint port
 

port
private int port
the endpoint port
Multiplicity:
1
 

SEPARATOR
private final static String SEPARATOR
separator for host and port information in the stringified endpoint
Final.
Multiplicity:
1
Static.
 
Constructor Detail
PacketChannelEndpoint
public void PacketChannelEndpoint (String host, Integer port)
 
initialized the endpoint with the specified host and port
Parameters:
host the endpoint host
port the endpoint port
Stereotype:
create
 

PacketChannelEndpoint
public void PacketChannelEndpoint ()
 
initialized an empty PacketChannelEndpoint
Stereotype:
create
 
Method Detail
getHost
public String getHost ()
 
Return:
the endpoint host
 

getPort
public int getPort ()
 
Return:
the endpoint port
 

getSocketAddress
public InetSocketAddress getSocketAddress ()
 
converts the endpoint into a java.net.InetSocketAddress
Return:
the endpoint as a java.net.InetSocketAddress
 

parse
public static PacketChannelEndpoint parse (String endpointString)
 
creates a new PacketChannelEndpoint by parsing the host and port
information from a string of the form : e.g. localhost:8080
Parameters:
endpointString the stringified endpoint of the form :
Return:
a PacketChannelEndpoint instance representing the endpoint described by the specified string
Static.
 

setHost
public void setHost (String host)
 
assigns the endpoint host
Parameters:
host the endpoint host
 

setPort
public void setPort (Integer port)
 
assigns the endpoint port
Parameters:
port the endpoint port
 

setSocketAddress
public void setSocketAddress (InetSocketAddress socketAddress)
 
assigns the endpoint host and port based on the specified java.net.InetSocketAddress
Parameters:
socketAddress the socket address from which to derive the endpoint information
 

toString
public String toString ()
 
creates a stringified representation for the endpoint of the form :
Return:
a stringified representation for the endpoint of the form :
 

Class
Tree
          
SUMMARY: INNER | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD