public class UDPChannelAddr extends ChannelAddress
ChannelAddress.ChannelAddressType| Modifier and Type | Field and Description |
|---|---|
static int |
RECV_BUFFER_BYTES |
static int |
SEND_BUFFER_BYTES |
| Constructor and Description |
|---|
UDPChannelAddr(FormatReader mFormat) |
UDPChannelAddr(java.lang.String inHostPort)
Constructs a new address with the given host:port.
|
UDPChannelAddr(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 static final int SEND_BUFFER_BYTES
public static final int RECV_BUFFER_BYTES
public UDPChannelAddr(java.lang.String inHostPort)
inHostPost - - The host:port of a node.public UDPChannelAddr(java.lang.String inHost,
int inPort)
inHost - - The host of this node.inPort - - The port of this node.public UDPChannelAddr(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