|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.InputStream seda.nbio.NonblockingInputStream seda.sandStorm.lib.util.MultiByteArrayInputStream seda.sandStorm.lib.aSocket.aSocketInputStream
public class aSocketInputStream
This is a utility class that allows you to push multiple ATcpInPackets in, and read bytes out as a stream. This is meant to be a convenience for performing packet processing using the aSocket interfaces. This class also takes care of reordering packets according to the ATcpInPacket sequence number; that is, if multiple threads in a stage are receiving ATcpInPackets for the same connection, the aSocketInputStream will internally reorder those packets.
MultiByteArrayInputStream
Nested Class Summary | |
---|---|
(package private) class |
aSocketInputStream.seqNumComparator
|
Field Summary | |
---|---|
private static boolean |
DEBUG
|
private long |
nextSeqNum
|
private java.util.TreeSet |
outoforder
|
Constructor Summary | |
---|---|
aSocketInputStream()
Create an aSocketInputStream with an initial sequence number of 1. |
|
aSocketInputStream(long initialSeqNum)
Create an aSocketInputStream using the given initial sequence number. |
Method Summary | |
---|---|
void |
addPacket(ATcpInPacket pkt)
Add a packet to this aSocketInputStream. |
void |
clear()
Reinitialize the state of this input stream, clearing all internal data and pointers. |
long |
getNextSequenceNumber()
Return the next expected sequence number. |
Methods inherited from class seda.sandStorm.lib.util.MultiByteArrayInputStream |
---|
addArray, available, close, mark, markSupported, nbRead, numArrays, read, read, read, reset, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final boolean DEBUG
private java.util.TreeSet outoforder
private long nextSeqNum
Constructor Detail |
---|
public aSocketInputStream()
public aSocketInputStream(long initialSeqNum)
Method Detail |
---|
public void addPacket(ATcpInPacket pkt)
public void clear()
clear
in class MultiByteArrayInputStream
public long getNextSequenceNumber()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |