|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsynergynetframework.appsystem.services.net.objectmessaging.connections.TCPConnectionHandler
public class TCPConnectionHandler
The Class TCPConnectionHandler.
| Constructor Summary | |
|---|---|
TCPConnectionHandler(ConnectionHandler connectionHandler,
int bufferSize)
Instantiates a new TCP connection handler. |
|
| Method Summary | |
|---|---|
java.nio.channels.SelectionKey |
accept(java.nio.channels.Selector selector,
java.nio.channels.SocketChannel socketChannel)
Accept. |
void |
close()
Close. |
void |
connect(java.nio.channels.Selector selector,
java.net.SocketAddress remoteAddress,
int timeout)
Connect. |
int |
getAliveTime()
Gets the alive time. |
java.nio.ByteBuffer |
getReadBuffer()
Gets the read buffer. |
java.nio.channels.SocketChannel |
getSocketChannel()
Gets the socket channel. |
java.nio.ByteBuffer |
getWriteBuffer()
Gets the write buffer. |
boolean |
needsKeepAlive()
Needs keep alive. |
java.lang.Object |
readObject()
Read object. |
int |
send(java.lang.Object object)
Send. |
void |
setAliveTime(int aliveTime)
Sets the alive time. |
void |
writeOperation()
Write operation. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TCPConnectionHandler(ConnectionHandler connectionHandler,
int bufferSize)
connectionHandler - the connection handlerbufferSize - the buffer size| Method Detail |
|---|
public java.nio.channels.SelectionKey accept(java.nio.channels.Selector selector,
java.nio.channels.SocketChannel socketChannel)
throws java.io.IOException
selector - the selectorsocketChannel - the socket channel
java.io.IOException - Signals that an I/O exception has occurred.public void close()
public void connect(java.nio.channels.Selector selector,
java.net.SocketAddress remoteAddress,
int timeout)
throws java.io.IOException
selector - the selectorremoteAddress - the remote addresstimeout - the timeout
java.io.IOException - Signals that an I/O exception has occurred.public int getAliveTime()
public java.nio.ByteBuffer getReadBuffer()
public java.nio.channels.SocketChannel getSocketChannel()
public java.nio.ByteBuffer getWriteBuffer()
public boolean needsKeepAlive()
public java.lang.Object readObject()
throws java.io.IOException,
SerializationException
java.io.IOException - Signals that an I/O exception has occurred.
SerializationException - the serialization exception
public int send(java.lang.Object object)
throws java.io.IOException,
SerializationException
object - the object
java.io.IOException - Signals that an I/O exception has occurred.
SerializationException - the serialization exceptionpublic void setAliveTime(int aliveTime)
aliveTime - the new alive time
public void writeOperation()
throws java.io.IOException
java.io.IOException - Signals that an I/O exception has occurred.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||