|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Flow
A flow is defined as a channel or connection between two or multiple endpoints. A flow is determined by addresses at OSI layer 2, 3 and layer 4.
A flow contains a flow key and a list of packets. A flow is a neat and natural way of organizing network traffic. Many different packets seen on the network can be grouped into Flows by the decoder. This makes it easy to sort through massive amount of data comming from the network.
Since packets on the network are usually not Flow sequential, that is
many different flows exist with packets being sent at unpredictable and
seemingly random times, the decoder builds many different flows
all at the same time. Only when either a flow is complete or maximum
number of packets allowed by the decoder has been added to the flow is
the flow expired from active queue onto the expired queue. The user can
drain the expired queue using the FlowDecoder.nextFlow() method.
When no more flows are available a null is returned by that method.
Alternatively you can implement DecoderListener interface and let the decoder notify you in real time when new flow is created, when a packet has been added to it or when it has expired or completed.
| Field Summary | |
|---|---|
static int |
LEFT
CONSTANT defines the arbitrary direction within the flow. |
static int |
MAX_PACKETS
MAX packets per flow allowed by the FlowDecoder |
static int |
RIGHT
CONSTANT defines the arbitrary direction within the flow. |
| Method Summary | |
|---|---|
void |
addLeftPacket(Packet packet)
Adds a new packet to the flow and labels it as going in the LEFT direction. |
void |
addRightPacket(Packet packet)
Adds a new packet to the flow and labels it as going in the RIGHT direction. |
FlowKey |
getFlowKey()
Returns the Flow key for this flow. |
java.util.List |
getLeftPackets()
Returns a list of packets only in the LEFT direction. |
int |
getPacketCount()
Total number of packets within this flow. |
java.util.List |
getPackets()
Returns a list of all the packets within the flow. |
java.util.List |
getRightPackets()
Returns a list of packets only in the RIGHT direction. |
java.lang.String |
getSummaryLine()
Returns a terse summary string of this flow. |
java.lang.String |
toString()
Turns into printable output. |
| Field Detail |
|---|
static final int LEFT
static final int RIGHT
static final int MAX_PACKETS
| Method Detail |
|---|
FlowKey getFlowKey()
void addLeftPacket(Packet packet)
packet - packet to add to the flow.void addRightPacket(Packet packet)
packet - packet to add to the flow.java.lang.String toString()
toString in class java.lang.Objectint getPacketCount()
java.util.List getPackets()
java.util.List getRightPackets()
java.util.List getLeftPackets()
java.lang.String getSummaryLine()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||