|
SourceForge Jpcap | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.jpcap.capture.CaptureTest
public class CaptureTest
Class to exercise PacketCapture.
Testing of PacketCapture could easily be implemented in the same class's main method, but since the tester is a client and must implement the listener interface, seems clearer to decouple the two.
| Field Summary | |
|---|---|
protected static String |
Filter
|
protected static String |
NAME
|
protected static int |
TEST_COUNT
|
| Constructor Summary | |
|---|---|
CaptureTest()
Create a new tester. |
|
| Method Summary | |
|---|---|
static void |
main(String[] args)
Simple test to exercise PacketCapture. |
void |
packetArrived(Packet packet)
Callback, called when PacketCapture.capture(int) captures a packet. |
void |
rawPacketArrived(RawPacket rawPacket)
|
void |
runTest()
Execute the test. |
void |
testDump()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static String NAME
protected static int TEST_COUNT
protected static String Filter
| Constructor Detail |
|---|
public CaptureTest()
| Method Detail |
|---|
public void packetArrived(Packet packet)
PacketListenerPacketCapture.capture(int) captures a packet.
packetArrived in interface PacketListenerpacket - Packet that has been captured.Object.clone()public void rawPacketArrived(RawPacket rawPacket)
rawPacketArrived in interface RawPacketListenerpublic void runTest()
public void testDump()
throws Exception
Exception
public static void main(String[] args)
throws IOException
IOException
|
Copyright © Patrick Charles & Jonas Lehmann, 2001; Esmond Pitt, 2008. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||