|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsynergynetframework.appsystem.services.net.objectmessaging.connections.UDPConnectionHandler
public class UDPConnectionHandler
The Class UDPConnectionHandler.
| Field Summary | |
|---|---|
int |
aliveTime
The alive time. |
java.net.InetSocketAddress |
connectedAddress
The connected address. |
java.nio.channels.DatagramChannel |
datagramChannel
The datagram channel. |
java.nio.ByteBuffer |
readBuffer
The write buffer. |
java.nio.ByteBuffer |
writeBuffer
The write buffer. |
| Constructor Summary | |
|---|---|
UDPConnectionHandler(int bufferSize)
Instantiates a new UDP connection handler. |
|
| Method Summary | |
|---|---|
void |
bind(java.nio.channels.Selector selector,
int localPort)
Bind. |
void |
close()
Close. |
void |
connect(java.nio.channels.Selector selector,
java.net.InetSocketAddress remoteAddress)
Connect. |
boolean |
needsKeepAlive()
Needs keep alive. |
java.net.InetSocketAddress |
readFromAddress()
Read from address. |
java.lang.Object |
readObject(ConnectionHandler connectionHandler)
Read object. |
int |
send(ConnectionHandler connectionHandler,
java.lang.Object object,
java.net.SocketAddress address)
Send. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int aliveTime
public java.net.InetSocketAddress connectedAddress
public java.nio.channels.DatagramChannel datagramChannel
public final java.nio.ByteBuffer readBuffer
public final java.nio.ByteBuffer writeBuffer
| Constructor Detail |
|---|
public UDPConnectionHandler(int bufferSize)
bufferSize - the buffer size| Method Detail |
|---|
public void bind(java.nio.channels.Selector selector,
int localPort)
throws java.io.IOException
selector - the selectorlocalPort - the local port
java.io.IOException - Signals that an I/O exception has occurred.public void close()
public void connect(java.nio.channels.Selector selector,
java.net.InetSocketAddress remoteAddress)
throws java.io.IOException
selector - the selectorremoteAddress - the remote address
java.io.IOException - Signals that an I/O exception has occurred.public boolean needsKeepAlive()
public java.net.InetSocketAddress readFromAddress()
throws java.io.IOException
java.io.IOException - Signals that an I/O exception has occurred.
public java.lang.Object readObject(ConnectionHandler connectionHandler)
throws SerializationException
connectionHandler - the connection handler
SerializationException - the serialization exception
public int send(ConnectionHandler connectionHandler,
java.lang.Object object,
java.net.SocketAddress address)
throws java.io.IOException,
SerializationException
connectionHandler - the connection handlerobject - the objectaddress - the address
java.io.IOException - Signals that an I/O exception has occurred.
SerializationException - the serialization exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||