com.slytechs.jnetstream.protocol
Class ProtocolImplementationType

java.lang.Object
  extended by com.slytechs.jnetstream.protocol.ProtocolImplementationType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public final class ProtocolImplementationType
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable

Enum structure which defines all of the jNetStream protocol types. In jNetStream protocols can be defined in several ways. This enum class defines the various types of protocol implementations available.

Note: pre-release 0.3, only single NPLSource type existed.

Since:
0.2.4
Author:
Mark Bednarczyk, Sly Technologies, Inc.
See Also:
Serialized Form

Field Summary
static ProtocolImplementationType Java
          Java implementation that has been completely or partially done in Java and will not be NPL interpreted.
static ProtocolImplementationType JavaStub
          A java stub file auto generated based on the NPL definition.
static ProtocolImplementationType Native
          Native implementation that has been done in C or C++ and is loosely bound to this java VM.
static ProtocolImplementationType NPL
          This type of implementation is done completely in NPL (Network Protocol Language) and is available on all system platforms.
static ProtocolImplementationType[] values
          Array of contants for this enum
 
Method Summary
 int compareTo(java.lang.Object arg0)
           
 int ordinal()
          Returns the ordinal of this enumeration constant (its position in its enum declaration, where the initial constant is assigned an ordinal of zero).
 java.lang.String toString()
          Returns the name of this enum constant, as contained in the declaration.
static ProtocolImplementationType valueOf(java.lang.String name)
          Retruns the enum constant with the specified name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Native

public static final ProtocolImplementationType Native
Native implementation that has been done in C or C++ and is loosely bound to this java VM.


Java

public static final ProtocolImplementationType Java
Java implementation that has been completely or partially done in Java and will not be NPL interpreted. When defined its available on all system platforms.


NPL

public static final ProtocolImplementationType NPL
This type of implementation is done completely in NPL (Network Protocol Language) and is available on all system platforms. The file may be in NPL binary (.npo) or NPL source (.npl) form and compiled at runtime. NPL type is required to be available in all implementations and releases of jNetStream. A protocol can not exist without a NPL defition even if its been solely defined in some other language.


JavaStub

public static final ProtocolImplementationType JavaStub
A java stub file auto generated based on the NPL definition. It provides compile time type ckecking when accessing dissected packet headers and fields.


values

public static final ProtocolImplementationType[] values
Array of contants for this enum

Method Detail

ordinal

public int ordinal()
Returns the ordinal of this enumeration constant (its position in its enum declaration, where the initial constant is assigned an ordinal of zero).

Returns:
the ordinal of this enumeration constant

valueOf

public static ProtocolImplementationType valueOf(java.lang.String name)
Retruns the enum constant with the specified name. The name must match exactly an identifier used to declar an enum contants in this type. (Extraneous white space characters are not permitted.)

Parameters:
name - the name of the constant to return
Returns:
the enum constant with the specified name

toString

public java.lang.String toString()
Returns the name of this enum constant, as contained in the declaration. This method may be overridden, though it typically isn't necessary or desirable. An enum type should override this method when a more "programmer-friendly" string form exists.

Overrides:
toString in class java.lang.Object
Returns:
the name of this enum constant

compareTo

public int compareTo(java.lang.Object arg0)
Specified by:
compareTo in interface java.lang.Comparable