SourceForge Jpcap

net.sourceforge.jpcap.capture
Enum JWinPcap.CaptureMode

java.lang.Object
  extended by java.lang.Enum<JWinPcap.CaptureMode>
      extended by net.sourceforge.jpcap.capture.JWinPcap.CaptureMode
All Implemented Interfaces:
Serializable, Comparable<JWinPcap.CaptureMode>
Enclosing class:
JWinPcap

public static enum JWinPcap.CaptureMode
extends Enum<JWinPcap.CaptureMode>

Capture mode, for use with setCaptureMode().

See Also:
JWinPcap.setCaptureMode(net.sourceforge.jpcap.capture.JWinPcap.CaptureMode)

Enum Constant Summary
Capture
          Packet capture mode.
Monitor
          Undocumented & unknown.
Statistical
          Statistics capture mode.
 
Method Summary
static JWinPcap.CaptureMode valueOf(String name)
          Returns the enum constant of this type with the specified name.
static JWinPcap.CaptureMode[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

Capture

public static final JWinPcap.CaptureMode Capture
Packet capture mode.


Statistical

public static final JWinPcap.CaptureMode Statistical
Statistics capture mode. In statistical mode, StatisticsEvents are delivered to a StatisticsListener. You can use a StatisticsListener to compute packets per second and bytes or bits per second, as shown in the tutorial linked below.

See Also:
JWinPcap.setCaptureMode(net.sourceforge.jpcap.capture.JWinPcap.CaptureMode), JWinPcap.addStatisticsListener(net.sourceforge.jpcap.capture.StatisticsListener), JWinPcap.removeStatisticsListener(net.sourceforge.jpcap.capture.StatisticsListener), Gathering Statistics on the network traffic

Monitor

public static final JWinPcap.CaptureMode Monitor
Undocumented & unknown.

Method Detail

values

public static final JWinPcap.CaptureMode[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(JWinPcap.CaptureMode c : JWinPcap.CaptureMode.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static JWinPcap.CaptureMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

Copyright © Patrick Charles & Jonas Lehmann, 2001; Esmond Pitt, 2008.