1.0.0

org.eclipse.soda.dk.parameter
Class SimpleParameter

java.lang.Object
  extended by org.eclipse.soda.dk.core.EscObject
      extended by org.eclipse.soda.dk.parameter.Parameter
          extended by org.eclipse.soda.dk.parameter.SimpleParameter
All Implemented Interfaces:
DataParameterService, ParameterService
Direct Known Subclasses:
SimpleIntegerParameter

public class SimpleParameter
extends Parameter

The SimpleParameter class implements the ParameterService interface.

Version:
1.0.0
See Also:
Parameter, ParameterService

Field Summary
 
Fields inherited from class org.eclipse.soda.dk.parameter.Parameter
MASKS, SET_MASKS, SET_TOP_MASKS
 
Fields inherited from class org.eclipse.soda.dk.core.EscObject
CLONE_EXCEPTION_RESOURCE, EMPTY_BYTES, EMPTY_STRING, ERROR_OCCURRED_EXCEPTION_RESOURCE, ID_FILTER_KEY, ID_KEY, ID_KEY_ANY, INTEGER_TABLE, KEY_KEY, LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_TRACE, LOG_WARNING, PREFIX_KEY, RESOURCE_BUNDLE, SLEEP_EXCEPTION_RESOURCE, SYSTEM_INFO_RESOURCE, TO_STRING_CONFIGURATION_KEYS, TRACE_LEVEL_HIGH, TRACE_LEVEL_LOW, TRACE_LEVEL_MAX, TRACE_LEVEL_MIN, TRACE_LEVEL_NONE, TRACE_LEVEL_NORMAL, TRACELEVEL_KEY, UNKNOWN_ERROR_RESOURCE
 
Fields inherited from interface org.eclipse.soda.dk.parameter.service.ParameterService
ARRAY, ASCII, ASCIIZ, BOOLEAN, BYTE, BYTES, DOUBLE, FLOAT, HEXASCII, HEXSTRING, INSERT, INTEGER, LITTLEENDIAN, LONG, NASCII, NSTRING, NULL, SHORT, STRING, UNSIGNED
 
Constructor Summary
SimpleParameter(java.lang.String key, int index, int size)
          Constructs an instance of this class from the specified key, index and size parameters.
SimpleParameter(java.lang.String key, int index, int size, short style)
          Constructs an instance of this class from the specified key, index, size and style parameters.
SimpleParameter(java.lang.String key, TransformService transform, int index, int size)
          Constructs an SimpleParameter object using the input parameter(s).
SimpleParameter(java.lang.String key, TransformService transform, int index, int size, short style)
          Constructs an SimpleParameter object using the input parameter(s).
 
Method Summary
 java.lang.Object decodeBytes(byte[] mbytes)
          Decode bytes with the specified mbytes parameter and return the Object result.
 java.lang.Object decodeBytes(byte[] mbytes, int dataIndex, int dataLength)
          Decode bytes with the specified mbytes, data index and data length parameters and return the Object result.
 double decodeDouble(byte[] bytes, int index, int size)
          Decode double with the specified bytes, index and size parameters and return the double result.
 java.lang.Object decodeDoubleObject(byte[] bytes, int index, int size)
          Decode double object with the specified bytes, index and size parameters and return the Object result.
 float decodeFloat(byte[] bytes, int index, int size)
          Decode float with the specified bytes, index and size parameters and return the float result.
 java.lang.Object decodeFloatObject(byte[] bytes, int index, int size)
          Decode float object with the specified bytes, index and size parameters and return the Object result.
 int decodeInt(byte[] bytes, int index, int size)
          Decode int with the specified bytes, index and size parameters and return the int result.
 java.lang.Object decodeIntegerObject(byte[] bytes, int index, int size)
          Decode integer object with the specified bytes, index and size parameters and return the Object result.
 long decodeLong(byte[] bytes, int index, int size)
          Decode long with the specified bytes, index and size parameters and return the long result.
 java.lang.Object decodeLongObject(byte[] bytes, int index, int size)
          Decode long object with the specified bytes, index and size parameters and return the Object result.
 java.lang.Object decodeMessage(MessageService message)
          Perform the decodeMessage method and return the Object result.
 java.lang.Object decodeShortObject(byte[] bytes, int index, int size)
          Decode short object with the specified bytes, index and size parameters and return the Object result.
 java.lang.Object encodeBytes(byte[] container, java.lang.Object data)
          Encode bytes with the specified container and data parameters and return the Object result.
 java.lang.Object encodeBytes(byte[] mbytes, java.lang.Object value, int offset, int dataIndex, int dataLength)
          Encode bytes with the specified mbytes, value, offset, data index and data length parameters and return the Object result.
 java.lang.Object encodeInt(byte[] bytes, int value, int offset, int length)
          Encode int with the specified bytes, value, offset and length parameters and return the Object result.
 java.lang.Object encodeIntObject(byte[] bytes, java.lang.Object value, int offset, int length)
          Encode int object with the specified bytes, value, offset and length parameters and return the Object result.
 java.lang.Object encodeLong(byte[] bytes, long value, int offset, int length)
          Encode long with the specified bytes, value, offset and length parameters and return the Object result.
 java.lang.Object encodeLongObject(byte[] bytes, java.lang.Object value, int offset, int length)
          Encode long object with the specified bytes, value, offset and length parameters and return the Object result.
protected  MessageService encodeMessage(MessageService message, byte[] value, int offset)
          Perform the encodeMessage method and return the MessageService result.
 MessageService encodeMessage(MessageService message, java.lang.Object value, int offset)
          Perform the encodeMessage method and return the MessageService result.
 java.lang.Object encodeShort(byte[] bytes, int value, int offset, int length)
          Encode short with the specified bytes, value, offset and length parameters and return the Object result.
 java.lang.Object encodeShortObject(byte[] bytes, java.lang.Object value, int offset, int length)
          Encode short object with the specified bytes, value, offset and length parameters and return the Object result.
 byte[] expand(byte[] bytes, int offset, int length)
          Expand with the specified bytes, offset and length parameters and return the byte[] result.
 int getIndex()
          Gets the int index property value.
 int getInt(java.lang.Object value)
          Get int with the specified value parameter and return the int result.
 long getLong(java.lang.Object value)
          Get long with the specified value parameter and return the long result.
protected  int getMask()
          Gets the int mask property value.
 short getShort(java.lang.Object value)
          Get short with the specified value parameter and return the short result.
 int getSize()
          Gets the int size property value.
 byte[] insert(byte[] bytes, int offset, byte[] insertBytes)
          Insert with the specified bytes, offset and insert bytes parameters and return the byte[] result.
 void setIndex(int index)
          Sets the index.
 
Methods inherited from class org.eclipse.soda.dk.parameter.Parameter
decode, decodeEnd, decodeString, decodeValue, encode, encodeBegin, encodeString, encodeValue, equals, getDefaultStyle, getKey, getLong, getStyle, getTransform, getTypeStyle, isArray, isInsert, isLittleEndian, isUnsigned, setBits, setKey, setStyle, setTransform
 
Methods inherited from class org.eclipse.soda.dk.core.EscObject
attemptRecoveryFromError, createDefaultLogService, createException, createException, createInteger, createIntegerTable, createNumber, format, getBoolean, getConfigurationService, getCurrentTimestamp, getDefaultLogService, getDefaultResource, getErrorSeverity, getFloat, getInt, getLoadLibraryName, getLogDetails, getLogDetails0, getLogDetails1, getLogDetails2, getLogDetails3, getLogDetails4, getLogDetails5, getLogDetails6, getLogDetails7, getLogService, getLong, getObject, getOutputName, getResource, getSimpleClassName, getStaticBoolean, getStaticFloat, getStaticInt, getStaticLong, getStaticObject, getStaticString, getString, getTraceLevel, getVmLibraryVersion, handleError, handleError, handleError, handleStaticError, handleStaticException, isDebug, isTrace, loadService, log, log, report, report, report, report, report, report, reportError, reportSystemInfo, setDebug, setDefaultLogService, setLogService, setTraceLevel, shouldLog, sleep, startupEscStatic, toString, toStringConfigurationKeys, toStringInfo
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleParameter

public SimpleParameter(java.lang.String key,
                       TransformService transform,
                       int index,
                       int size,
                       short style)
Constructs an SimpleParameter object using the input parameter(s).

Parameters:
transform - org.eclipse.soda.dk.transform.service.TransformService
index - int
size - int
style - short
key - The key (String) parameter.
See Also:
SimpleParameter(String,int,int), SimpleParameter(String,int,int,short), SimpleParameter(String,TransformService,int,int)

SimpleParameter

public SimpleParameter(java.lang.String key,
                       int index,
                       int size)
Constructs an instance of this class from the specified key, index and size parameters.

Parameters:
key - The key (String) parameter.
index - The index (int) parameter.
size - The size (int) parameter.
See Also:
SimpleParameter(String,TransformService,int,int,short), SimpleParameter(String,int,int,short), SimpleParameter(String,TransformService,int,int)

SimpleParameter

public SimpleParameter(java.lang.String key,
                       int index,
                       int size,
                       short style)
Constructs an instance of this class from the specified key, index, size and style parameters.

Parameters:
key - The key (String) parameter.
index - The index (int) parameter.
size - The size (int) parameter.
style - The style (short) parameter.
See Also:
SimpleParameter(String,TransformService,int,int,short), SimpleParameter(String,int,int), SimpleParameter(String,TransformService,int,int)

SimpleParameter

public SimpleParameter(java.lang.String key,
                       TransformService transform,
                       int index,
                       int size)
Constructs an SimpleParameter object using the input parameter(s).

Parameters:
transform - org.eclipse.soda.dk.transform.service.TransformService
index - int
size - int
key - The key (String) parameter.
See Also:
SimpleParameter(String,TransformService,int,int,short), SimpleParameter(String,int,int), SimpleParameter(String,int,int,short)
Method Detail

decodeBytes

public java.lang.Object decodeBytes(byte[] mbytes)
Decode bytes with the specified mbytes parameter and return the Object result.

Overrides:
decodeBytes in class Parameter
Parameters:
mbytes - The mbytes (byte[]) parameter.
Returns:
Results of the decode bytes (Object) value.
See Also:
decodeBytes(byte[],int,int), encodeBytes(byte[],Object), encodeBytes(byte[],Object,int,int,int)

decodeBytes

public java.lang.Object decodeBytes(byte[] mbytes,
                                    int dataIndex,
                                    int dataLength)
Decode bytes with the specified mbytes, data index and data length parameters and return the Object result.

Parameters:
mbytes - The mbytes (byte[]) parameter.
dataIndex - The data index (int) parameter.
dataLength - The data length (int) parameter.
Returns:
Results of the decode bytes (Object) value.
See Also:
decodeBytes(byte[]), encodeBytes(byte[],Object), encodeBytes(byte[],Object,int,int,int)

decodeDouble

public double decodeDouble(byte[] bytes,
                           int index,
                           int size)
Decode double with the specified bytes, index and size parameters and return the double result.

Parameters:
bytes - The bytes (byte[]) parameter.
index - The index (int) parameter.
size - The size (int) parameter.
Returns:
Results of the decode double (double) value.

decodeDoubleObject

public java.lang.Object decodeDoubleObject(byte[] bytes,
                                           int index,
                                           int size)
Decode double object with the specified bytes, index and size parameters and return the Object result.

Parameters:
bytes - The bytes (byte[]) parameter.
index - The index (int) parameter.
size - The size (int) parameter.
Returns:
Results of the decode double object (Object) value.

decodeFloat

public float decodeFloat(byte[] bytes,
                         int index,
                         int size)
Decode float with the specified bytes, index and size parameters and return the float result.

Parameters:
bytes - The bytes (byte[]) parameter.
index - The index (int) parameter.
size - The size (int) parameter.
Returns:
Results of the decode float (float) value.

decodeFloatObject

public java.lang.Object decodeFloatObject(byte[] bytes,
                                          int index,
                                          int size)
Decode float object with the specified bytes, index and size parameters and return the Object result.

Parameters:
bytes - The bytes (byte[]) parameter.
index - The index (int) parameter.
size - The size (int) parameter.
Returns:
Results of the decode float object (Object) value.

decodeInt

public int decodeInt(byte[] bytes,
                     int index,
                     int size)
Decode int with the specified bytes, index and size parameters and return the int result.

Parameters:
bytes - The bytes (byte[]) parameter.
index - The index (int) parameter.
size - The size (int) parameter.
Returns:
Results of the decode int (int) value.
See Also:
encodeInt(byte[],int,int,int), getInt(Object)

decodeIntegerObject

public java.lang.Object decodeIntegerObject(byte[] bytes,
                                            int index,
                                            int size)
Decode integer object with the specified bytes, index and size parameters and return the Object result.

Parameters:
bytes - The bytes (byte[]) parameter.
index - The index (int) parameter.
size - The size (int) parameter.
Returns:
Results of the decode integer object (Object) value.

decodeLong

public long decodeLong(byte[] bytes,
                       int index,
                       int size)
Decode long with the specified bytes, index and size parameters and return the long result.

Parameters:
bytes - The bytes (byte[]) parameter.
index - The index (int) parameter.
size - The size (int) parameter.
Returns:
Results of the decode long (long) value.
See Also:
encodeLong(byte[],long,int,int), getLong(Object)

decodeLongObject

public java.lang.Object decodeLongObject(byte[] bytes,
                                         int index,
                                         int size)
Decode long object with the specified bytes, index and size parameters and return the Object result.

Parameters:
bytes - The bytes (byte[]) parameter.
index - The index (int) parameter.
size - The size (int) parameter.
Returns:
Results of the decode long object (Object) value.
See Also:
encodeLongObject(byte[],Object,int,int)

decodeMessage

public java.lang.Object decodeMessage(MessageService message)
Perform the decodeMessage method and return the Object result.

Overrides:
decodeMessage in class Parameter
Parameters:
message - org.eclipse.soda.dk.message.service.MessageService
Returns:
Results of the decode message (Object) value.
See Also:
encodeMessage(MessageService,Object,int), encodeMessage(MessageService,byte[],int)

decodeShortObject

public java.lang.Object decodeShortObject(byte[] bytes,
                                          int index,
                                          int size)
Decode short object with the specified bytes, index and size parameters and return the Object result.

Parameters:
bytes - The bytes (byte[]) parameter.
index - The index (int) parameter.
size - The size (int) parameter.
Returns:
Results of the decode short object (Object) value.
See Also:
encodeShortObject(byte[],Object,int,int)

encodeBytes

public java.lang.Object encodeBytes(byte[] container,
                                    java.lang.Object data)
Encode bytes with the specified container and data parameters and return the Object result.

Overrides:
encodeBytes in class Parameter
Parameters:
container - The container (byte[]) parameter.
data - The data (Object) parameter.
Returns:
Results of the encode bytes (Object) value.
See Also:
decodeBytes(byte[]), decodeBytes(byte[],int,int), encodeBytes(byte[],Object,int,int,int)

encodeBytes

public java.lang.Object encodeBytes(byte[] mbytes,
                                    java.lang.Object value,
                                    int offset,
                                    int dataIndex,
                                    int dataLength)
Encode bytes with the specified mbytes, value, offset, data index and data length parameters and return the Object result.

Parameters:
mbytes - The mbytes (byte[]) parameter.
value - The value (Object) parameter.
offset - The offset (int) parameter.
dataIndex - The data index (int) parameter.
dataLength - The data length (int) parameter.
Returns:
Results of the encode bytes (Object) value.
See Also:
decodeBytes(byte[]), decodeBytes(byte[],int,int), encodeBytes(byte[],Object)

encodeInt

public java.lang.Object encodeInt(byte[] bytes,
                                  int value,
                                  int offset,
                                  int length)
Encode int with the specified bytes, value, offset and length parameters and return the Object result.

Parameters:
bytes - The bytes (byte[]) parameter.
value - The value (int) parameter.
offset - The offset (int) parameter.
length - The length (int) parameter.
Returns:
Results of the encode int (Object) value.
See Also:
decodeInt(byte[],int,int), getInt(Object)

encodeIntObject

public java.lang.Object encodeIntObject(byte[] bytes,
                                        java.lang.Object value,
                                        int offset,
                                        int length)
Encode int object with the specified bytes, value, offset and length parameters and return the Object result.

Parameters:
bytes - The bytes (byte[]) parameter.
value - The value (Object) parameter.
offset - The offset (int) parameter.
length - The length (int) parameter.
Returns:
Results of the encode int object (Object) value.

encodeLong

public java.lang.Object encodeLong(byte[] bytes,
                                   long value,
                                   int offset,
                                   int length)
Encode long with the specified bytes, value, offset and length parameters and return the Object result.

Parameters:
bytes - The bytes (byte[]) parameter.
value - The value (long) parameter.
offset - The offset (int) parameter.
length - The length (int) parameter.
Returns:
Results of the encode long (Object) value.
See Also:
decodeLong(byte[],int,int), getLong(Object)

encodeLongObject

public java.lang.Object encodeLongObject(byte[] bytes,
                                         java.lang.Object value,
                                         int offset,
                                         int length)
Encode long object with the specified bytes, value, offset and length parameters and return the Object result.

Parameters:
bytes - The bytes (byte[]) parameter.
value - The value (Object) parameter.
offset - The offset (int) parameter.
length - The length (int) parameter.
Returns:
Results of the encode long object (Object) value.
See Also:
decodeLongObject(byte[],int,int)

encodeMessage

public MessageService encodeMessage(MessageService message,
                                    java.lang.Object value,
                                    int offset)
Perform the encodeMessage method and return the MessageService result.

Overrides:
encodeMessage in class Parameter
Parameters:
message - org.eclipse.soda.dk.message.service.MessageService
value - java.lang.Object
offset - int
Returns:
Results of the encode message (MessageService) value.
See Also:
decodeMessage(MessageService), encodeMessage(MessageService,byte[],int)

encodeMessage

protected MessageService encodeMessage(MessageService message,
                                       byte[] value,
                                       int offset)
Perform the encodeMessage method and return the MessageService result.

Parameters:
message - org.eclipse.soda.dk.message.service.MessageService
value - java.lang.Object
offset - int
Returns:
Results of the encode message (MessageService) value.
See Also:
decodeMessage(MessageService), encodeMessage(MessageService,Object,int)

encodeShort

public java.lang.Object encodeShort(byte[] bytes,
                                    int value,
                                    int offset,
                                    int length)
Encode short with the specified bytes, value, offset and length parameters and return the Object result.

Parameters:
bytes - The bytes (byte[]) parameter.
value - The value (int) parameter.
offset - The offset (int) parameter.
length - The length (int) parameter.
Returns:
Results of the encode short (Object) value.
See Also:
getShort(Object)

encodeShortObject

public java.lang.Object encodeShortObject(byte[] bytes,
                                          java.lang.Object value,
                                          int offset,
                                          int length)
Encode short object with the specified bytes, value, offset and length parameters and return the Object result.

Parameters:
bytes - The bytes (byte[]) parameter.
value - The value (Object) parameter.
offset - The offset (int) parameter.
length - The length (int) parameter.
Returns:
Results of the encode short object (Object) value.
See Also:
decodeShortObject(byte[],int,int)

expand

public byte[] expand(byte[] bytes,
                     int offset,
                     int length)
Expand with the specified bytes, offset and length parameters and return the byte[] result.

Parameters:
bytes - The bytes (byte[]) parameter.
offset - The offset (int) parameter.
length - The length (int) parameter.
Returns:
Results of the expand (byte[]) value.

getIndex

public int getIndex()
Gets the int index property value.

Returns:
Results of the get index (int) value.
See Also:
setIndex(int)

getInt

public int getInt(java.lang.Object value)
Get int with the specified value parameter and return the int result.

Parameters:
value - The value (Object) parameter.
Returns:
Results of the get int (int) value.
See Also:
decodeInt(byte[],int,int), encodeInt(byte[],int,int,int)

getLong

public long getLong(java.lang.Object value)
Get long with the specified value parameter and return the long result.

Parameters:
value - The value (Object) parameter.
Returns:
Results of the get long (long) value.
See Also:
decodeLong(byte[],int,int), encodeLong(byte[],long,int,int)

getMask

protected int getMask()
Gets the int mask property value.

Returns:
Results of the get mask (int) value.

getShort

public short getShort(java.lang.Object value)
Get short with the specified value parameter and return the short result.

Parameters:
value - The value (Object) parameter.
Returns:
Results of the get short (short) value.
See Also:
encodeShort(byte[],int,int,int)

getSize

public int getSize()
Gets the int size property value.

Returns:
Results of the get size (int) value.

insert

public byte[] insert(byte[] bytes,
                     int offset,
                     byte[] insertBytes)
Insert with the specified bytes, offset and insert bytes parameters and return the byte[] result.

Parameters:
bytes - The bytes (byte[]) parameter.
offset - The offset (int) parameter.
insertBytes - The insert bytes (byte[]) parameter.
Returns:
Results of the insert (byte[]) value.

setIndex

public void setIndex(int index)
Sets the index.

Parameters:
index - The index to set
See Also:
getIndex()

1.0.0

Copyright (c) 1999, 2007 IBM