|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.catalina.cluster.io.Jdk13ObjectReader
The object reader object is an object used in conjunction with
java.nio TCP messages. This object stores the message bytes in a
XByteBuffer
until a full package has been received.
When a full package has been received, the append method will call messageDataReceived
on the callback object associated with this object reader.
This object uses an XByteBuffer which is an extendable object buffer that also allows
for message encoding and decoding.
Constructor Summary | |
Jdk13ObjectReader(java.net.Socket socket,
ListenCallback callback,
boolean compress)
use this socket and callback to receive messages |
Method Summary | |
int |
append(byte[] data,
int off,
int len)
Append new bytes to buffer. |
int |
execute()
send message to callback |
int |
write(byte[] data)
write data to socket (ack) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Jdk13ObjectReader(java.net.Socket socket, ListenCallback callback, boolean compress)
socket
- listener socketcallback
- SimpleTcpCluster listenercompress
- is send message data compress or flat.Method Detail |
public int append(byte[] data, int off, int len) throws java.io.IOException
data
- new transfer bufferoff
- offsetlen
- length in buffer
java.io.IOException
SimpleTcpCluster.messageDataReceived(byte[])
,
XByteBuffer.doesPackageExist()
,
XByteBuffer.extractPackage(boolean)
public int execute() throws java.io.IOException
java.io.IOException
append(byte[], int, int)
public int write(byte[] data) throws java.io.IOException
data
-
java.io.IOException
org.apache.catalina.cluster.tcp.Jdk13ReplicationListener#sendAck
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |