net.sourceforge.jpcap.capture
Class CaptureTest
java.lang.Object
net.sourceforge.jpcap.capture.CaptureTest
- All Implemented Interfaces:
- RawPacketListener
- public class CaptureTest
- extends java.lang.Object
- implements RawPacketListener
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 java.lang.String |
NAME
|
protected static int |
TEST_COUNT
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAME
protected static java.lang.String NAME
TEST_COUNT
protected static int TEST_COUNT
CaptureTest
public CaptureTest()
- Create a new tester.
rawPacketArrived
public void rawPacketArrived(RawPacket rawPacket)
- Specified by:
rawPacketArrived
in interface RawPacketListener
runTest
public void runTest()
- Execute the test.
main
public static void main(java.lang.String[] args)
- Simple test to exercise PacketCapture.