org.jnetstream.protocol
Enum Characteristic.Kind

java.lang.Object
  extended by java.lang.Enum<Characteristic.Kind>
      extended by org.jnetstream.protocol.Characteristic.Kind
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Characteristic.Kind>, Characteristic
Enclosing interface:
Characteristic

public static enum Characteristic.Kind
extends java.lang.Enum<Characteristic.Kind>
implements Characteristic

Kind of protocol this is. A table of constants that define the kind of protocol as a characteristic. The last bit in the 32-bit unsigned integer determines has the kind of protocol. When set its a group protocol, if not set its a dissector.

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jnetstream.protocol.Characteristic
Characteristic.BitCodec, Characteristic.Frame, Characteristic.Kind, Characteristic.Physical
 
Enum Constant Summary
Dissector
          The protocol is a dissector kind of a protocol and contains codecs for encoding and dissecting protocols.
Group
          The protocol is a protocol group which only contains binding information and produces no real header that is exported to the packet.
 
Method Summary
 int getValue()
           
static java.util.Set<? extends Characteristic> valueOf(int value)
          Returns as set the kind characteristic of this protocol.
static Characteristic.Kind valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Characteristic.Kind[] 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

Dissector

public static final Characteristic.Kind Dissector
The protocol is a dissector kind of a protocol and contains codecs for encoding and dissecting protocols.


Group

public static final Characteristic.Kind Group
The protocol is a protocol group which only contains binding information and produces no real header that is exported to the packet.

Method Detail

values

public static final Characteristic.Kind[] 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(Characteristic.Kind c : Characteristic.Kind.values())
        System.out.println(c);

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

valueOf

public static Characteristic.Kind valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

getValue

public final int getValue()
Specified by:
getValue in interface Characteristic
Returns:
the value

valueOf

public static java.util.Set<? extends Characteristic> valueOf(int value)
Returns as set the kind characteristic of this protocol. Only a single characteristic of type kind can be assigned, therefore the returned set will always contain a single value.

Parameters:
value - integer value with bit encoded kind characteristic
Returns:
a set containing the decoded constants