2009-01-09 1.2.0

org.eclipse.soda.dk.parameter
Class StreamParameter

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

public class StreamParameter
extends EscObject
implements ParameterService

Version:
1.2.0

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
StreamParameter(java.lang.String key)
          Constructs an instance of this class.
StreamParameter(java.lang.String key, short style)
          Constructs an instance of this class from the specified key and style parameters.
StreamParameter(java.lang.String key, short style, short externalStyle)
          Constructs an instance of this class from the specified key, style and external style parameters.
 
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)
          Decode message with the specified message and cursor parameters 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)
          Decode value with the specified message and cursor parameters 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 and return the Object 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)
          Encode value with the specified message, value and cursor parameters and return the MessageService 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.
 short getExternalStyle()
          Gets the external style (short) value.
 short getExternalTypeStyle()
          Gets the external type style (short) value.
 java.lang.String getKey()
          Gets the key (String) value.
protected  int getLength(ParameterCursorService cursor)
          Gets the int length property 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.
protected  int getOffset(ParameterCursorService cursor)
          Gets the int offset property value.
 int getOffsetDefault()
          Gets the offset default (int) value.
 int getOffsetLength()
          Gets the offset length (int) value.
 short getStyle()
          Gets the short style property value.
 TransformService getTransform()
          Gets the transform (TransformService) 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 setExternalStyle(short style)
          Sets the external style value.
 void setKey(java.lang.String key)
          Sets the key value.
 void setStyle(short style)
          Sets the style 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, equals, 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

StreamParameter

public StreamParameter(java.lang.String key)
Constructs an instance of this class.

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

StreamParameter

public StreamParameter(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:
StreamParameter(String), StreamParameter(String,short,short)

StreamParameter

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

Parameters:
key - The key (String) parameter.
style - The style (short) parameter.
externalStyle - The external style (short) parameter.
See Also:
StreamParameter(String), StreamParameter(String,short)
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)

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)

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[])

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)
Decode message with the specified message and cursor parameters and return the Object result.

Parameters:
message - The message (MessageService) parameter.
cursor - The cursor (ParameterCursorService) parameter.
Returns:
Results of the decode message (Object) value.

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
Decode value with the specified message and cursor parameters 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 and return the Object result.

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

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)
Encode value with the specified message, value and cursor parameters and return the MessageService result.

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) value.
See Also:
decodeValue(MessageService), decodeValue(MessageService,ParameterCursorService), encodeValue(MessageService,Object)

getExternalStyle

public short getExternalStyle()
Gets the external style (short) value.

Returns:
The external style (short) value.
See Also:
setExternalStyle(short)

getExternalTypeStyle

public short getExternalTypeStyle()
Gets the external type style (short) value.

Returns:
The external type style (short) 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)

getLength

protected int getLength(ParameterCursorService cursor)
Gets the int length property value.

Parameters:
cursor - The cursor (ParameterCursorService) parameter.
Returns:
Results of the get length (int) value.
See Also:
getOffsetLength()

getOffset

protected int getOffset(ParameterCursorService cursor)
Gets the int offset property value.

Parameters:
cursor - The cursor (ParameterCursorService) parameter.
Returns:
Results of the get offset (int) value.

getOffsetDefault

public int getOffsetDefault()
Gets the offset default (int) value.

Returns:
The offset default (int) value.

getOffsetLength

public int getOffsetLength()
Gets the offset length (int) value.

Returns:
The offset length (int) value.

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(), getExternalStyle(), getExternalTypeStyle(), getTypeStyle(), setExternalStyle(short), setStyle(short)

getTransform

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

Returns:
The transform (TransformService) value.

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.
See Also:
getExternalTypeStyle()

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.

setExternalStyle

public void setExternalStyle(short style)
Sets the external style value.

Parameters:
style - The style (short) parameter.
See Also:
getExternalStyle()

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(), getExternalStyle(), getExternalTypeStyle(), getStyle(), getTypeStyle(), setExternalStyle(short)

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.