|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.voytechs.jnetstream.codec.FlowImpl
public class FlowImpl
Implementing class for Flow interface. Flow is a grouping of packets between a source and destination.
Flow has 2 directions, the "left" and "right". These are abstract directions and neither directions is of any greater importance then then the other. It is upto the Decoder to create in a certain way vs. another. Initial FlowDecoder implementation created flows so that left flow was client end while the right flow was the server end.
Please note that is not always possible to determine which direction is from the client end which from the server end.
| Field Summary |
|---|
| Fields inherited from interface com.voytechs.jnetstream.codec.Flow |
|---|
LEFT, MAX_PACKETS, RIGHT |
| Constructor Summary | |
|---|---|
FlowImpl(FlowKey key)
Initialize a new Flow |
|
| Method Summary | |
|---|---|
void |
addLeftPacket(Packet packet)
Adds a given packet to this flow. |
void |
addRightPacket(Packet packet)
Adds a given packet to this flow. |
boolean |
equals(java.lang.Object key)
Compares the FlowKeys between this flow and one being compared to. |
long |
getExpireTimeout()
Returns the time when this flow needs to be expired. |
FlowKey |
getFlowKey()
Returns the Flow key for this flow. |
java.util.List |
getLeftPackets()
Returns a list of LEFT packets |
int |
getPacketCount()
Returns the number of total packets in this flow. |
java.util.List |
getPackets()
Returns a list of packets in their original sequence. |
java.util.List |
getRightPackets()
Returns a list of RIGHT packets |
java.lang.String |
getSummaryLine()
Returns a terse summary string of this flow. |
int |
hashCode()
|
void |
resetExpireTimeout()
|
void |
setExpireTimeout(long time)
Sets the time from now when this flow is to be expired. |
java.lang.String |
toString()
Turns into printable output. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FlowImpl(FlowKey key)
key - flow key that uniquely identifies this flow.| Method Detail |
|---|
public FlowKey getFlowKey()
getFlowKey in interface Flowpublic java.util.List getLeftPackets()
getLeftPackets in interface Flowpublic java.util.List getRightPackets()
getRightPackets in interface Flowpublic java.util.List getPackets()
getPackets in interface Flowpublic int getPacketCount()
getPacketCount in interface Flowpublic boolean equals(java.lang.Object key)
equals in class java.lang.Objectkey - Flow key to compare against.
public int hashCode()
hashCode in class java.lang.Objectpublic void addLeftPacket(Packet packet)
addLeftPacket in interface Flowpacket - The packet to add to the flow.public void addRightPacket(Packet packet)
addRightPacket in interface Flowpacket - The packet to add to the flow.public void setExpireTimeout(long time)
time - the time when this flow should be expired.public long getExpireTimeout()
public void resetExpireTimeout()
public java.lang.String toString()
Flow
toString in interface FlowtoString in class java.lang.Objectpublic java.lang.String getSummaryLine()
Flow
getSummaryLine in interface Flow
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||