net.sourceforge.jpcap.capture
Class CaptureTest

java.lang.Object
  extended bynet.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
           
 
Constructor Summary
CaptureTest()
          Create a new tester.
 
Method Summary
static void main(java.lang.String[] args)
          Simple test to exercise PacketCapture.
 void rawPacketArrived(RawPacket rawPacket)
           
 void runTest()
          Execute the test.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

protected static java.lang.String NAME

TEST_COUNT

protected static int TEST_COUNT
Constructor Detail

CaptureTest

public CaptureTest()
Create a new tester.

Method Detail

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.