SourceForge Jpcap

net.sourceforge.jpcap.capture
Enum JWinPcap.SamplingMethod

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

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

Sampling method for use with setSamplingMethod().

See Also:
JWinPcap.setSamplingMethod(net.sourceforge.jpcap.capture.JWinPcap.SamplingMethod, int)

Enum Constant Summary
FirstAfterNms
          Sample the first packet to arrive after every N milliseconds, where N is given by the value supplied to JWinPcap.setSamplingMethod(net.sourceforge.jpcap.capture.JWinPcap.SamplingMethod, int).
None
          No sampling.
OneEveryN
          Sample one packet after every N packets, where N is given by the value supplied to JWinPcap.setSamplingMethod(net.sourceforge.jpcap.capture.JWinPcap.SamplingMethod, int).
 
Method Summary
static JWinPcap.SamplingMethod valueOf(String name)
          Returns the enum constant of this type with the specified name.
static JWinPcap.SamplingMethod[] 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

None

public static final JWinPcap.SamplingMethod None
No sampling.


OneEveryN

public static final JWinPcap.SamplingMethod OneEveryN
Sample one packet after every N packets, where N is given by the value supplied to JWinPcap.setSamplingMethod(net.sourceforge.jpcap.capture.JWinPcap.SamplingMethod, int).


FirstAfterNms

public static final JWinPcap.SamplingMethod FirstAfterNms
Sample the first packet to arrive after every N milliseconds, where N is given by the value supplied to JWinPcap.setSamplingMethod(net.sourceforge.jpcap.capture.JWinPcap.SamplingMethod, int).

Method Detail

values

public static final JWinPcap.SamplingMethod[] 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.SamplingMethod c : JWinPcap.SamplingMethod.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.SamplingMethod 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.