2009-01-09 1.2.0

org.eclipse.soda.dk.parameter
Class Parameter

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

public class Parameter
extends EscObject
implements ParameterService, DataParameterService

The Parameter class implements the ParameterService interface.

Since:
1.0
Version:
1.2.0
See Also:
ParameterService, TransformService

Field Summary
static int[] MASKS
          Define the masks (int[]) constant.
static int[] SET_MASKS
          Define the set masks (int[]) constant.
static int[] SET_TOP_MASKS
          Define the set top masks (int[]) constant.
 
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, ID_NAME_KEY, INTEGER_TABLE, INTEGER_TABLE_SIZE, KEY_KEY, LOG_DEBUG, LOG_DEFAULT, LOG_ERROR, LOG_INFO, LOG_LEVEL_KEY, LOG_TRACE, LOG_WARNING, LONG_TABLE, LONG_TABLE_SIZE, PREFIX_KEY, READONLY_EMPTY_COLLECTION, READONLY_EMPTY_LIST, READONLY_EMPTY_MAP, 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, Unmodifiable
 
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, SERVICE_NAME, SHORT, STRING, UNLIMITED, UNSIGNED, USE_CURSOR, USE_CURSOR_INSERT
 
Constructor Summary
Parameter(java.lang.String key)
          Constructs an instance of this class from the specified key parameter.
Parameter(java.lang.String key, short style)
          Constructs an instance of this class from the specified key and style parameters.
Parameter(java.lang.String key, TransformService transform)
          Constructs an Parameter object using the input parameter(s).
Parameter(java.lang.String key, TransformService transform, short style)
          Constructs an Parameter object using the input parameter(s).
 
Method Summary
 java.lang.Object decode(java.lang.Object container)
          Decode with the specified container parameter and return the Object result.
 java.lang.Object decodeBytes(byte[] container, ParameterCursorService cursor)
          Decode bytes with the specified container parameter and return the Object result.
 java.lang.Object decodeEnd(java.lang.Object object)
          Decode end with the specified object parameter and return the Object result.
protected  java.lang.Object decodeMessage(MessageService message, ParameterCursorService cursor)
          Perform the decodeMessage method and return the Object result.
 java.lang.Object decodeString(java.lang.String container, ParameterCursorService cursor)
          Decode string with the specified container parameter and return the Object result.
 java.lang.Object decodeValue(MessageService message)
          Decode value with the specified message parameter and return the Object result.
 java.lang.Object decodeValue(MessageService message, ParameterCursorService cursor)
          Perform the decodeValue method and return the Object result.
 java.lang.Object encode(java.lang.Object container, java.lang.Object data)
          Encode with the specified container and data parameters.
 java.lang.Object encodeBegin(java.lang.Object value)
          Encode begin with the specified value parameter and return the Object result.
 java.lang.Object encodeBytes(byte[] container, java.lang.Object data, ParameterCursorService cursor)
          Encode bytes with the specified container and data parameters and return the Object result.
 MessageService encodeMessage(MessageService message, java.lang.Object value, int offset, ParameterCursorService cursor)
          Perform the encodeMessage method and return the MessageService result.
 java.lang.Object encodeString(java.lang.String container, java.lang.Object data, ParameterCursorService cursor)
          Encode string with the specified container and data parameters and return the Object result.
 MessageService encodeValue(MessageService message, java.lang.Object value)
          Encode value with the specified message and value parameters and return the MessageService result.
 MessageService encodeValue(MessageService message, java.lang.Object value, ParameterCursorService cursor)
          Perform the encodeValue method and return the MessageService result.
 boolean equals(java.lang.Object object)
          Equals with the specified object parameter and return the boolean result.
static byte[] getBytes(byte[] bytes, int offset, int length)
          Get bytes with the specified bytes, offset and length parameters and return the byte[] result.
static short getDefaultStyle()
          Gets the default style (short) value.
 java.lang.String getKey()
          Gets the key (String) value.
static long getLong(byte[] bytes, int offset, int length)
          Get long with the specified bytes, offset and length parameters and return the long result.
 short getStyle()
          Gets the short style property value.
 TransformService getTransform()
          Gets the TransformService transform property value.
 short getTypeStyle()
          Gets the short typeStyle property value.
 boolean isArray()
          Gets the array (boolean) value.
 boolean isConstantParameter()
          Gets the constant parameter (boolean) value.
 boolean isInsert()
          Gets the boolean insert property value.
 boolean isLittleEndian()
          Gets the boolean littleEndian property value.
 boolean isUnsigned()
          Gets the boolean unsigned property value.
static void setBits(byte[] bytes, int offset, int length, long value)
          Set bits with the specified bytes, offset, length and value parameters.
static void setBytes(byte[] bytes, int offset, int length, byte[] data)
          Get bytes with the specified bytes, offset and length parameters and return the byte[] result.
 void setKey(java.lang.String key)
          Sets the key value.
 void setStyle(short style)
          Sets the style value.
protected  void setTransform(TransformService transform)
          Sets the transform value.
protected  void updateCursor(ParameterCursorService cursor)
          Update cursor with the specified cursor parameter.
 
Methods inherited from class org.eclipse.soda.dk.core.EscObject
attemptRecoveryFromError, createBoolean, createDefaultLogService, createException, createException, createInteger, createIntegerTable, createLong, createLongTable, createNumber, format, getBoolean, getByte, getChar, getConfigurationService, getCurrentTimestamp, getDefaultLogService, getDefaultResource, getDouble, getErrorSeverity, getFloat, getId, getIdName, getInt, getLoadLibraryName, getLogDetails, getLogDetails, getLogDetails0, getLogDetails1, getLogDetails2, getLogDetails3, getLogDetails4, getLogDetails5, getLogDetails6, getLogDetails7, getLogLevel, getLogService, getLong, getObject, getOutputName, getReadOnlyEmptyCollection, getReadOnlyEmptyList, getReadOnlyEmptyMap, getResource, getShort, getSimpleClassName, getStaticBoolean, getStaticByte, getStaticChar, getStaticDouble, getStaticFloat, getStaticInt, getStaticLong, getStaticObject, getStaticShort, getStaticString, getString, getTraceLevel, getVmLibraryVersion, handleError, handleError, handleError, handleError, handleErrorInternal, handleStaticError, handleStaticException, isBackward, isDebug, isLogging, isTrace, isUnmodifiable, loadService, log, log, log, report, report, report, report, report, report, report, reportError, reportSystemInfo, setBackward, setDebug, setDefaultLogService, setLogService, setTraceLevel, setUnmodifiable, shouldLog, sleep, startupEscStatic, toString, toStringConfigurationKeys, toStringInfo
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MASKS

public static final int[] MASKS
Define the masks (int[]) constant.


SET_MASKS

public static final int[] SET_MASKS
Define the set masks (int[]) constant.


SET_TOP_MASKS

public static final int[] SET_TOP_MASKS
Define the set top masks (int[]) constant.

Constructor Detail

Parameter

public Parameter(java.lang.String key)
Constructs an instance of this class from the specified key parameter.

Parameters:
key - The key (String) parameter.
See Also:
Parameter(String,short), Parameter(String,TransformService), Parameter(String,TransformService,short), isConstantParameter()

Parameter

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

Parameters:
key - The key (String) parameter.
style - The style (short) parameter.
See Also:
Parameter(String), Parameter(String,TransformService), Parameter(String,TransformService,short), isConstantParameter()

Parameter

public Parameter(java.lang.String key,
                 TransformService transform)
Constructs an Parameter object using the input parameter(s). org.eclipse.soda.dk.transform.service.TransformService

Parameters:
key - The key (String) parameter.
transform - The transform (TransformService) parameter.
See Also:
Parameter(String), Parameter(String,short), Parameter(String,TransformService,short), isConstantParameter()

Parameter

public Parameter(java.lang.String key,
                 TransformService transform,
                 short style)
Constructs an Parameter object using the input parameter(s). org.eclipse.soda.dk.transform.service.TransformService short

Parameters:
key - The key (String) parameter.
transform - The transform (TransformService) parameter.
style - The style (short) parameter.
See Also:
Parameter(String), Parameter(String,short), Parameter(String,TransformService), isConstantParameter()
Method Detail

getBytes

public static byte[] getBytes(byte[] bytes,
                              int offset,
                              int length)
Get bytes 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 get bytes (byte[]) value.
See Also:
setBytes(byte[],int,int,byte[]), decodeBytes(byte[],ParameterCursorService), encodeBytes(byte[],Object,ParameterCursorService)

getDefaultStyle

public static short getDefaultStyle()
Gets the default style (short) value.

Returns:
The default style (short) value.

getLong

public static long getLong(byte[] bytes,
                           int offset,
                           int length)
Get long with the specified bytes, offset and length parameters and return the long result.

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

setBits

public static void setBits(byte[] bytes,
                           int offset,
                           int length,
                           long value)
Set bits with the specified bytes, offset, length and value parameters.

Parameters:
bytes - The bytes (byte[]) parameter.
offset - The offset (int) parameter.
length - The length (int) parameter.
value - The value (long) parameter.

setBytes

public static void setBytes(byte[] bytes,
                            int offset,
                            int length,
                            byte[] data)
Get bytes 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.
data - The data (byte[]) parameter.
See Also:
getBytes(byte[],int,int), decodeBytes(byte[],ParameterCursorService), encodeBytes(byte[],Object,ParameterCursorService)

decode

public java.lang.Object decode(java.lang.Object container)
Decode with the specified container parameter and return the Object result.

Specified by:
decode in interface DataParameterService
Parameters:
container - The container (Object) parameter.
Returns:
Results of the decode (Object) value.

decodeBytes

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

Parameters:
container - The container (byte[]) parameter.
cursor - The cursor (ParameterCursorService) parameter.
Returns:
Results of the decode bytes (Object) value.
See Also:
getBytes(byte[],int,int), setBytes(byte[],int,int,byte[]), encodeBytes(byte[],Object,ParameterCursorService)

decodeEnd

public java.lang.Object decodeEnd(java.lang.Object object)
Decode end with the specified object parameter and return the Object result.

Parameters:
object - The object (Object) parameter.
Returns:
Results of the decode end (Object) value.

decodeMessage

protected java.lang.Object decodeMessage(MessageService message,
                                         ParameterCursorService cursor)
Perform the decodeMessage method and return the Object result. org.eclipse.soda.dk.message.service.MessageService

Parameters:
message - The message (MessageService) parameter.
cursor - The cursor (ParameterCursorService) parameter.
Returns:
Results of the decode message (Object) value.
See Also:
encodeMessage(MessageService,Object,int,ParameterCursorService)

decodeString

public java.lang.Object decodeString(java.lang.String container,
                                     ParameterCursorService cursor)
Decode string with the specified container parameter and return the Object result.

Parameters:
container - The container (String) parameter.
cursor - The cursor (ParameterCursorService) parameter.
Returns:
Results of the decode string (Object) value.
See Also:
encodeString(String,Object,ParameterCursorService)

decodeValue

public java.lang.Object decodeValue(MessageService message)
Decode value with the specified message parameter and return the Object result.

Specified by:
decodeValue in interface ParameterService
Parameters:
message - The message (MessageService) parameter.
Returns:
Results of the decode value (Object) value.
See Also:
decodeValue(MessageService,ParameterCursorService), encodeValue(MessageService,Object), encodeValue(MessageService,Object,ParameterCursorService)

decodeValue

public java.lang.Object decodeValue(MessageService message,
                                    ParameterCursorService cursor)
                             throws java.lang.NumberFormatException
Perform the decodeValue method and return the Object result.

Specified by:
decodeValue in interface ParameterService
Parameters:
message - The message (MessageService) parameter.
cursor - The cursor (ParameterCursorService) parameter.
Returns:
Results of the decode value (Object) value.
Throws:
java.lang.NumberFormatException - Number Format Exception.
See Also:
decodeValue(MessageService), encodeValue(MessageService,Object), encodeValue(MessageService,Object,ParameterCursorService)

encode

public java.lang.Object encode(java.lang.Object container,
                               java.lang.Object data)
Encode with the specified container and data parameters.

Specified by:
encode in interface DataParameterService
Parameters:
container - The container (Object) parameter.
data - The data (Object) parameter.
Returns:
Results of the encode (Object) value.

encodeBegin

public java.lang.Object encodeBegin(java.lang.Object value)
Encode begin with the specified value parameter and return the Object result.

Parameters:
value - The value (Object) parameter.
Returns:
Results of the encode begin (Object) value.

encodeBytes

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

Parameters:
container - The container (byte[]) parameter.
data - The data (Object) parameter.
cursor - The cursor (ParameterCursorService) parameter.
Returns:
Results of the encode bytes (Object) value.
See Also:
getBytes(byte[],int,int), setBytes(byte[],int,int,byte[]), decodeBytes(byte[],ParameterCursorService)

encodeMessage

public MessageService encodeMessage(MessageService message,
                                    java.lang.Object value,
                                    int offset,
                                    ParameterCursorService cursor)
Perform the encodeMessage method and return the MessageService result. org.eclipse.soda.dk.message.service.MessageService java.lang.Object int value.

Parameters:
message - The message (MessageService) parameter.
value - The value (Object) parameter.
offset - The offset (int) parameter.
cursor - The cursor (ParameterCursorService) parameter.
Returns:
Results of the encode message (MessageService)
See Also:
decodeMessage(MessageService,ParameterCursorService)

encodeString

public java.lang.Object encodeString(java.lang.String container,
                                     java.lang.Object data,
                                     ParameterCursorService cursor)
Encode string with the specified container and data parameters and return the Object result.

Parameters:
container - The container (String) parameter.
data - The data (Object) parameter.
cursor - The cursor (ParameterCursorService) parameter.
Returns:
Results of the encode string (Object) value.
See Also:
decodeString(String,ParameterCursorService)

encodeValue

public MessageService encodeValue(MessageService message,
                                  java.lang.Object value)
Encode value with the specified message and value parameters and return the MessageService result.

Specified by:
encodeValue in interface ParameterService
Parameters:
message - The message (MessageService) parameter.
value - The value (Object) parameter.
Returns:
Results of the encode value (MessageService) value.
See Also:
decodeValue(MessageService), decodeValue(MessageService,ParameterCursorService), encodeValue(MessageService,Object,ParameterCursorService)

encodeValue

public MessageService encodeValue(MessageService message,
                                  java.lang.Object value,
                                  ParameterCursorService cursor)
Perform the encodeValue method and return the MessageService result. org.eclipse.soda.dk.message.service.MessageService java.lang.Object

Specified by:
encodeValue in interface ParameterService
Parameters:
message - The message (MessageService) parameter.
value - The value (Object) parameter.
cursor - The cursor (ParameterCursorService) parameter.
Returns:
Results of the encode value (MessageService)
See Also:
decodeValue(MessageService), decodeValue(MessageService,ParameterCursorService), encodeValue(MessageService,Object)

equals

public boolean equals(java.lang.Object object)
Equals with the specified object parameter and return the boolean result.

Overrides:
equals in class java.lang.Object
Parameters:
object - The object (Object) parameter.
Returns:
Results of the equals (boolean) value.

getKey

public java.lang.String getKey()
Gets the key (String) value.

Specified by:
getKey in interface ParameterService
Returns:
The key (String) value.
See Also:
setKey(String)

getStyle

public short getStyle()
Gets the short style property value.

Return the number of bytes (not bit length) of the parameter.

Returns:
Results of the get style (short) value.
See Also:
getDefaultStyle(), getTypeStyle(), setStyle(short)

getTransform

public TransformService getTransform()
Gets the TransformService transform property value.

Returns:
Results of the get transform (TransformService)
See Also:
setTransform(TransformService)

getTypeStyle

public short getTypeStyle()
Gets the short typeStyle property value.

Return the number of bytes (not bit length) of the parameter.

Returns:
Results of the get type style (short) value.

isArray

public boolean isArray()
Gets the array (boolean) value.

Returns:
The array (boolean) value.

isConstantParameter

public boolean isConstantParameter()
Gets the constant parameter (boolean) value.

Specified by:
isConstantParameter in interface ParameterService
Returns:
The constant parameter (boolean) value.

isInsert

public boolean isInsert()
Gets the boolean insert property value.

Returns:
Results of the is insert (boolean) value.

isLittleEndian

public boolean isLittleEndian()
Gets the boolean littleEndian property value.

Returns:
Results of the is little endian (boolean) value.

isUnsigned

public boolean isUnsigned()
Gets the boolean unsigned property value.

Return the number of bytes (not bit length) of the parameter.

Returns:
Results of the is unsigned (boolean) value.

setKey

public void setKey(java.lang.String key)
Sets the key value.

Parameters:
key - The key (String) parameter.
See Also:
getKey()

setStyle

public void setStyle(short style)
Sets the style value.

Parameters:
style - The style (short) parameter.
See Also:
getDefaultStyle(), getStyle(), getTypeStyle()

setTransform

protected void setTransform(TransformService transform)
Sets the transform value.

Parameters:
transform - The transform (TransformService) parameter.
See Also:
getTransform()

updateCursor

protected void updateCursor(ParameterCursorService cursor)
Update cursor with the specified cursor parameter.

Parameters:
cursor - The cursor (ParameterCursorService) parameter.

2009-01-09 1.2.0

Copyright (c) 2009 IBM. See license in Legal section.