1.0.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, OffsetParameter, SimpleParameter, TagParameter

public class Parameter
extends EscObject
implements ParameterService, DataParameterService

The Parameter class implements the ParameterService interface.

Version:
1.0.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, 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
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)
          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)
          Perform the decodeMessage method and return the Object result.
 java.lang.Object decodeString(java.lang.String container)
          Decode string with the specified container parameter and return the Object result.
 java.lang.Object decodeValue(MessageService message)
          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)
          Encode bytes with the specified container and data parameters and return the Object result.
 MessageService encodeMessage(MessageService message, java.lang.Object value, int offset)
          Perform the encodeMessage method and return the MessageService result.
 java.lang.Object encodeString(java.lang.String container, java.lang.Object data)
          Encode string with the specified container and data parameters and return the Object result.
 MessageService encodeValue(MessageService message, java.lang.Object value)
          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 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 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.
 void setKey(java.lang.String key)
          Sets the key.
 void setStyle(short style)
          Sets the style property.
protected  void setTransform(TransformService transform)
          Sets the transform property.
 
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
 

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,
                 TransformService transform,
                 short style)
Constructs an Parameter object using the input parameter(s). org.eclipse.soda.dk.transform.service.TransformService short The key (String) parameter.

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

Parameter

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

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

Parameter

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

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

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 The key (String) parameter.

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

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. The bytes (byte[]) parameter. The offset (int) parameter. The length (int) parameter.

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. The bytes (byte[]) parameter. The offset (int) parameter. The length (int) parameter. The value (long) parameter.

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

decode

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

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)
Decode bytes with the specified container parameter and return the Object result. The container (byte[]) parameter.

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

decodeEnd

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

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

decodeMessage

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

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

decodeString

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

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

decodeValue

public java.lang.Object decodeValue(MessageService message)
                             throws java.lang.NumberFormatException
Perform the decodeValue method and return the Object result. org.eclipse.soda.dk.message.service.MessageService

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

encode

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

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. The value (Object) parameter.

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)
Encode bytes with the specified container and data parameters and return the Object result. The container (byte[]) parameter. The data (Object) parameter.

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

encodeMessage

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

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

encodeString

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

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

encodeValue

public MessageService encodeValue(MessageService message,
                                  java.lang.Object value)
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.
Returns:
Results of the encode value (MessageService) value.
See Also:
ParameterService.encodeValue(org.eclipse.soda.dk.message.service.MessageService, java.lang.Object), decodeValue(MessageService)

equals

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

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) value.
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.

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. The key to set

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

setStyle

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

Return the number of bytes (not bit length) of the parameter. The new property value (short).

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

setTransform

protected void setTransform(TransformService transform)
Sets the transform property. The new property value (org.eclipse.soda.dk.transform.service.TransformService).

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

1.0.0

Copyright (c) 1999, 2007 IBM