SMILA 1.0 API documentation

org.eclipse.smila.ipc.bon
Enum BinaryToken

java.lang.Object
  extended by java.lang.Enum<BinaryToken>
      extended by org.eclipse.smila.ipc.bon.BinaryToken
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<BinaryToken>

public enum BinaryToken
extends java.lang.Enum<BinaryToken>

Tokens used in the binary protocol implementation. Contains mapping between binary tokens and standard IPC Tokens. See http://wiki.eclipse.org/SMILA/Documentation/Data_Model_and_Serialization_Formats#BON_Binary_Object_Notation_Format for specification.

Author:
aweber

Enum Constant Summary
ATTACHMENTS_END
          attachment list end.
ATTACHMENTS_START
          attachment list start.
BINARY_1
          (followed by) 1-byte binary object length (and binary object).
BINARY_2
          (followed by) 2-byte binary object length (and binary object).
BINARY_3
          (followed by) 3-byte binary object length (and binary object).
BINARY_4
          (followed by) 4-byte binary object length (and binary object).
MAPPING_END
          mapping end.
MAPPING_START
          mapping start.
OBJECT_END
          object end.
OBJECT_START
          object start.
SCALAR_BOOL_FALSE
          boolean FALSE.
SCALAR_BOOL_TRUE
          boolean TRUE.
SCALAR_DOUBLE
          (followed by) 8 byte float value.
SCALAR_INT_1
          (followed by) 1 byte positive integer.
SCALAR_INT_1_N
          (followed by) 1 byte negative integer.
SCALAR_INT_2
          (followed by) 2 byte positive integer.
SCALAR_INT_2_N
          (followed by) 2 byte negative integer.
SCALAR_INT_3
          (followed by) 3 byte positive integer.
SCALAR_INT_3_N
          (followed by) 3 byte negative integer.
SCALAR_INT_4
          (followed by) 4 byte positive integer.
SCALAR_INT_4_N
          (followed by) 4 byte negative integer.
SCALAR_INT_5
          (followed by) 5 byte positive integer.
SCALAR_INT_5_N
          (followed by) 5 byte negative integer.
SCALAR_INT_6
          (followed by) 6 byte positive integer.
SCALAR_INT_6_N
          (followed by) 6 byte negative integer.
SCALAR_INT_7
          (followed by) 7 byte positive integer.
SCALAR_INT_7_N
          (followed by) 7 byte negative integer.
SCALAR_INT_8
          (followed by) 8 byte positive integer.
SCALAR_INT_8_N
          (followed by) 8 byte negative integer.
SCALAR_STRING_1
          (followed by) 1 byte string length (and string).
SCALAR_STRING_2
          (followed by) 2 byte string length (and string).
SCALAR_STRING_3
          (followed by) 3 byte string length (and string).
SCALAR_STRING_4
          (followed by) 4 byte string length (and string).
SEQUENCE_END
          sequence end.
SEQUENCE_START
          sequence start.
 
Method Summary
 IpcToken asIpcToken()
           
 byte byteValue()
           
static BinaryToken getToken(int byteValue)
           
 boolean hasNegativeValue()
           
 boolean hasValue()
           
 int valueLength()
           
static BinaryToken valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static BinaryToken[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SCALAR_INT_1

public static final BinaryToken SCALAR_INT_1
(followed by) 1 byte positive integer.


SCALAR_INT_2

public static final BinaryToken SCALAR_INT_2
(followed by) 2 byte positive integer.


SCALAR_INT_3

public static final BinaryToken SCALAR_INT_3
(followed by) 3 byte positive integer.


SCALAR_INT_4

public static final BinaryToken SCALAR_INT_4
(followed by) 4 byte positive integer.


SCALAR_INT_5

public static final BinaryToken SCALAR_INT_5
(followed by) 5 byte positive integer.


SCALAR_INT_6

public static final BinaryToken SCALAR_INT_6
(followed by) 6 byte positive integer.


SCALAR_INT_7

public static final BinaryToken SCALAR_INT_7
(followed by) 7 byte positive integer.


SCALAR_INT_8

public static final BinaryToken SCALAR_INT_8
(followed by) 8 byte positive integer.


SCALAR_INT_1_N

public static final BinaryToken SCALAR_INT_1_N
(followed by) 1 byte negative integer.


SCALAR_INT_2_N

public static final BinaryToken SCALAR_INT_2_N
(followed by) 2 byte negative integer.


SCALAR_INT_3_N

public static final BinaryToken SCALAR_INT_3_N
(followed by) 3 byte negative integer.


SCALAR_INT_4_N

public static final BinaryToken SCALAR_INT_4_N
(followed by) 4 byte negative integer.


SCALAR_INT_5_N

public static final BinaryToken SCALAR_INT_5_N
(followed by) 5 byte negative integer.


SCALAR_INT_6_N

public static final BinaryToken SCALAR_INT_6_N
(followed by) 6 byte negative integer.


SCALAR_INT_7_N

public static final BinaryToken SCALAR_INT_7_N
(followed by) 7 byte negative integer.


SCALAR_INT_8_N

public static final BinaryToken SCALAR_INT_8_N
(followed by) 8 byte negative integer.


SCALAR_BOOL_TRUE

public static final BinaryToken SCALAR_BOOL_TRUE
boolean TRUE.


SCALAR_BOOL_FALSE

public static final BinaryToken SCALAR_BOOL_FALSE
boolean FALSE.


SCALAR_DOUBLE

public static final BinaryToken SCALAR_DOUBLE
(followed by) 8 byte float value.


SCALAR_STRING_1

public static final BinaryToken SCALAR_STRING_1
(followed by) 1 byte string length (and string).


SCALAR_STRING_2

public static final BinaryToken SCALAR_STRING_2
(followed by) 2 byte string length (and string).


SCALAR_STRING_3

public static final BinaryToken SCALAR_STRING_3
(followed by) 3 byte string length (and string).


SCALAR_STRING_4

public static final BinaryToken SCALAR_STRING_4
(followed by) 4 byte string length (and string).


OBJECT_START

public static final BinaryToken OBJECT_START
object start.


OBJECT_END

public static final BinaryToken OBJECT_END
object end.


SEQUENCE_START

public static final BinaryToken SEQUENCE_START
sequence start.


SEQUENCE_END

public static final BinaryToken SEQUENCE_END
sequence end.


MAPPING_START

public static final BinaryToken MAPPING_START
mapping start.


MAPPING_END

public static final BinaryToken MAPPING_END
mapping end.


ATTACHMENTS_START

public static final BinaryToken ATTACHMENTS_START
attachment list start.


ATTACHMENTS_END

public static final BinaryToken ATTACHMENTS_END
attachment list end.


BINARY_1

public static final BinaryToken BINARY_1
(followed by) 1-byte binary object length (and binary object).


BINARY_2

public static final BinaryToken BINARY_2
(followed by) 2-byte binary object length (and binary object).


BINARY_3

public static final BinaryToken BINARY_3
(followed by) 3-byte binary object length (and binary object).


BINARY_4

public static final BinaryToken BINARY_4
(followed by) 4-byte binary object length (and binary object).

Method Detail

values

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

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

valueOf

public static BinaryToken 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
java.lang.NullPointerException - if the argument is null

byteValue

public byte byteValue()
Returns:
byte representation of token.

valueLength

public int valueLength()
Returns:
byte length of token value.

asIpcToken

public IpcToken asIpcToken()
Returns:
IpcToken representation of binary token.

getToken

public static BinaryToken getToken(int byteValue)
Parameters:
byteValue - a byte value.
Returns:
token for given byte value.

hasValue

public boolean hasValue()
Returns:
true if token has value, otherwise false.

hasNegativeValue

public boolean hasNegativeValue()
Returns:
true if token has negative value, otherwise false. This is needed for scalar integers.

SMILA 1.0 API documentation