public class TCPChannelAddr extends ChannelAddress
ChannelAddress.ChannelAddressType| Constructor and Description |
|---|
TCPChannelAddr(FormatReader mFormat) |
TCPChannelAddr(java.lang.String inHostPort)
Constructs a new address with the given host:port.
|
TCPChannelAddr(java.lang.String inHost,
int inPort)
Constructs a new address with the given host and port.
|
| Modifier and Type | Method and Description |
|---|---|
ChannelManager |
connect(java.nio.channels.ByteChannel inChannel,
ChannelProtocol inProtocol)
Completes a connection made to the node.
|
ChannelManager |
connect(ChannelProtocol inProtocol)
Opens a new connection to the node.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getHost()
Get the host address of the node.
|
java.lang.String |
getHostPort()
Get the combined host and port as host:port.
|
int |
getPort()
Get the port number of the node.
|
int |
hashCode() |
ChannelListener |
listen(ChannelProtocolFactory inProtocolFactory)
Starts a listener on this address.
|
void |
marshall(FormatWriter mFormat) |
java.lang.String |
toString() |
marshallpublic TCPChannelAddr(java.lang.String inHostPort)
inHostPost - - The host:port of a node.public TCPChannelAddr(java.lang.String inHost,
int inPort)
inHost - - The host of this node.inPort - - The port of this node.public TCPChannelAddr(FormatReader mFormat) throws FormatException
FormatExceptionpublic java.lang.String getHost()
public java.lang.String getHostPort()
public int getPort()
public ChannelListener listen(ChannelProtocolFactory inProtocolFactory) throws ConnectException
ChannelAddresslisten in class ChannelAddressConnectExceptionpublic ChannelManager connect(ChannelProtocol inProtocol) throws ConnectException
ChannelAddressconnect in class ChannelAddressConnectExceptionpublic ChannelManager connect(java.nio.channels.ByteChannel inChannel, ChannelProtocol inProtocol) throws ConnectException
ChannelAddressconnect in class ChannelAddressConnectExceptionpublic void marshall(FormatWriter mFormat) throws FormatException
mFormat - - The format writer to write toFormatException - If there was a problem while writingpublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object