UM Java API  6.15
com.latencybusters.pdm.PDMMessage Class Reference

A PDM message consists of a definition and the corresponding optional and required fields as specified by the definition. Use PDMMessage#toBytes() to serialize a message to bytes or PDMMessage#parse(byte[]) to deserialize a message from bytes. See Pre-Defined Messages for general information on PDM. More...

Public Member Functions

 PDMMessage ()
 
 PDMMessage (PDMDefinition definition)
 
 PDMMessage (int definitionId, int versionMajor, int versionMinor)
 
PDMDefinition getDefinition ()
 
PDMSerializer getSerializer ()
 
void setSerializer (PDMSerializer ser)
 
PDMDeserializer getDeserializer ()
 
void setDeserializer (PDMDeserializer deser)
 
int getVersionPolicy ()
 
void setVersionPolicy (int versionPolicy)
 
boolean isIncludeDefinition ()
 
void setIncludeDefinition (boolean includeDefinition)
 
boolean isUseMsgDefIfNeeded ()
 
void setUseMsgDefIfNeeded (boolean useMsgDefIfNeeded)
 
boolean isTryToLoadDefFromCache ()
 
void setTryToLoadDefFromCache (boolean tryToLoadDefFromCache)
 
int getMessageLen ()
 
void updateOptOrVarFlag (PDMField field)
 
boolean isFieldValueSet (PDMFieldInfo fieldInfo)
 
PDMFieldIterator createFieldIterator ()
 
void loadDefinition (PDMDefinition definition)
 
PDMMessage removeFieldValue (PDMFieldInfo fieldInfo)
 
PDMMessage setFieldValue (PDMFieldInfo fieldInfo, boolean value)
 
PDMMessage setFieldValue (PDMFieldInfo fieldInfo, byte value)
 
PDMMessage setFieldValue (PDMFieldInfo fieldInfo, short value)
 
PDMMessage setFieldValue (PDMFieldInfo fieldInfo, int value)
 
PDMMessage setFieldValue (PDMFieldInfo fieldInfo, long value)
 
PDMMessage setFieldValue (PDMFieldInfo fieldInfo, BigInteger value)
 
PDMMessage setFieldValue (PDMFieldInfo fieldInfo, float value)
 
PDMMessage setFieldValue (PDMFieldInfo fieldInfo, double value)
 
PDMMessage setFieldValue (PDMFieldInfo fieldInfo, PDMDecimal value)
 
PDMMessage setFieldValue (PDMFieldInfo fieldInfo, PDMTimestamp value)
 
PDMMessage setFieldValue (PDMFieldInfo fieldInfo, String value)
 
PDMMessage setFieldValue (PDMFieldInfo fieldInfo, PDMMessage value)
 
PDMMessage setFieldValue (PDMFieldInfo fieldInfo, boolean[] value)
 
PDMMessage setFieldValue (PDMFieldInfo fieldInfo, byte[] value)
 
PDMMessage setFieldValue (PDMFieldInfo fieldInfo, short[] value)
 
PDMMessage setFieldValue (PDMFieldInfo fieldInfo, int[] value)
 
PDMMessage setFieldValue (PDMFieldInfo fieldInfo, long[] value)
 
PDMMessage setFieldValue (PDMFieldInfo fieldInfo, BigInteger[] value)
 
PDMMessage setFieldValue (PDMFieldInfo fieldInfo, float[] value)
 
PDMMessage setFieldValue (PDMFieldInfo fieldInfo, double[] value)
 
PDMMessage setFieldValue (PDMFieldInfo fieldInfo, PDMDecimal[] value)
 
PDMMessage setFieldValue (PDMFieldInfo fieldInfo, PDMTimestamp[] value)
 
PDMMessage setFieldValue (PDMFieldInfo fieldInfo, String[] value)
 
PDMMessage setFieldValue (PDMFieldInfo fieldInfo, byte[][] value)
 
PDMMessage setFieldValue (PDMFieldInfo fieldInfo, PDMMessage[] value)
 
Object getFieldValue (PDMFieldInfo fieldInfo)
 
boolean getFieldValueAsBoolean (PDMFieldInfo fieldInfo)
 
byte getFieldValueAsInt8 (PDMFieldInfo fieldInfo)
 
short getFieldValueAsUInt8 (PDMFieldInfo fieldInfo)
 
short getFieldValueAsInt16 (PDMFieldInfo fieldInfo)
 
int getFieldValueAsUInt16 (PDMFieldInfo fieldInfo)
 
int getFieldValueAsInt32 (PDMFieldInfo fieldInfo)
 
long getFieldValueAsUInt32 (PDMFieldInfo fieldInfo)
 
long getFieldValueAsInt64 (PDMFieldInfo fieldInfo)
 
BigInteger getFieldValueAsUInt64 (PDMFieldInfo fieldInfo)
 
float getFieldValueAsFloat (PDMFieldInfo fieldInfo)
 
double getFieldValueAsDouble (PDMFieldInfo fieldInfo)
 
PDMDecimal getFieldValueAsDecimal (PDMFieldInfo fieldInfo)
 
PDMTimestamp getFieldValueAsTimestamp (PDMFieldInfo fieldInfo)
 
String getFieldValueAsString (PDMFieldInfo fieldInfo)
 
byte[] getFieldValueAsBlob (PDMFieldInfo fieldInfo)
 
PDMMessage getFieldValueAsMessage (PDMFieldInfo fieldInfo)
 
boolean[] getFieldValueAsBooleanArray (PDMFieldInfo fieldInfo)
 
byte[] getFieldValueAsInt8Array (PDMFieldInfo fieldInfo)
 
short[] getFieldValueAsUInt8Array (PDMFieldInfo fieldInfo)
 
short[] getFieldValueAsInt16Array (PDMFieldInfo fieldInfo)
 
int[] getFieldValueAsUInt16Array (PDMFieldInfo fieldInfo)
 
int[] getFieldValueAsInt32Array (PDMFieldInfo fieldInfo)
 
long[] getFieldValueAsUInt32Array (PDMFieldInfo fieldInfo)
 
long[] getFieldValueAsInt64Array (PDMFieldInfo fieldInfo)
 
BigInteger[] getFieldValueAsUInt64Array (PDMFieldInfo fieldInfo)
 
float[] getFieldValueAsFloatArray (PDMFieldInfo fieldInfo)
 
double[] getFieldValueAsDoubleArray (PDMFieldInfo fieldInfo)
 
PDMDecimal[] getFieldValueAsDecimalArray (PDMFieldInfo fieldInfo)
 
PDMTimestamp[] getFieldValueAsTimestampArray (PDMFieldInfo fieldInfo)
 
String[] getFieldValueAsStringArray (PDMFieldInfo fieldInfo)
 
byte[][] getFieldValueAsBlobArray (PDMFieldInfo fieldInfo)
 
PDMMessage[] getFieldValueAsMessageArray (PDMFieldInfo fieldInfo)
 
byte[] toBytes ()
 
byte[] toBytes (PDMSerializer ser)
 
int toBytes (PDMSerializer ser, byte[] ba, int pos)
 
int parse (byte[] ba)
 
int parse (byte[] ba, int pos)
 
int parse (PDMDeserializer deser, byte[] ba, int pos)
 
boolean isMsgDirty ()
 
void setMsgDirty (boolean msgDirty)
 

Static Public Attributes

static final int VERSION_POLICY_EXACT = 0
 
static final int VERSION_POLICY_BEST = 1
 

Protected Member Functions

Collection< PDMFieldgetFields ()
 
int getDataSegmentLen ()
 

Detailed Description

A PDM message consists of a definition and the corresponding optional and required fields as specified by the definition. Use PDMMessage#toBytes() to serialize a message to bytes or PDMMessage#parse(byte[]) to deserialize a message from bytes. See Pre-Defined Messages for general information on PDM.

Constructor & Destructor Documentation

com.latencybusters.pdm.PDMMessage.PDMMessage ( )

Empty constructor can be used when the PDMDefinition is not available.

com.latencybusters.pdm.PDMMessage.PDMMessage ( PDMDefinition  definition)

Creates a message from a finalized PDMDefinition

Parameters
definitionThe finalized PDMDefinition

References com.latencybusters.pdm.PDMMessage.loadDefinition().

com.latencybusters.pdm.PDMMessage.PDMMessage ( int  definitionId,
int  versionMajor,
int  versionMinor 
)

Creates a message from a finalized definition by looking it up in the PDMDefinitionCache by the id passed

Parameters
definitionIdThe definition id to lookup in the cache
versionMajor
versionMinor

References com.latencybusters.pdm.PDMDefinitionCache.get(), com.latencybusters.pdm.PDMDefinitionCache.getInstance(), and com.latencybusters.pdm.PDMMessage.loadDefinition().

Member Function Documentation

PDMFieldIterator com.latencybusters.pdm.PDMMessage.createFieldIterator ( )

Creates a new PDMFieldIterator to traverse through the PDMFields

Object com.latencybusters.pdm.PDMMessage.getFieldValue ( PDMFieldInfo  fieldInfo)

Gets a field value by using the PDMFieldInfo handle from the PDMDefinition

Parameters
fieldInfothe PDMFieldInfo handle
Returns
The value as an Object that can be casted.
byte [] com.latencybusters.pdm.PDMMessage.getFieldValueAsBlob ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a byte[]

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getBlobValue().

byte [][] com.latencybusters.pdm.PDMMessage.getFieldValueAsBlobArray ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a an array of blobs

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getBlobArrayValue().

boolean com.latencybusters.pdm.PDMMessage.getFieldValueAsBoolean ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a boolean

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getBooleanValue().

boolean [] com.latencybusters.pdm.PDMMessage.getFieldValueAsBooleanArray ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a boolean[]

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getBooleanArrayValue().

PDMDecimal com.latencybusters.pdm.PDMMessage.getFieldValueAsDecimal ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a PDMDecimal

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getDecimalValue().

PDMDecimal [] com.latencybusters.pdm.PDMMessage.getFieldValueAsDecimalArray ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a PDMDecimal[]

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getDecimalArrayValue().

double com.latencybusters.pdm.PDMMessage.getFieldValueAsDouble ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a double

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getDoubleValue().

double [] com.latencybusters.pdm.PDMMessage.getFieldValueAsDoubleArray ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a double[]

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getDoubleArrayValue().

float com.latencybusters.pdm.PDMMessage.getFieldValueAsFloat ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a float

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getFloatValue().

float [] com.latencybusters.pdm.PDMMessage.getFieldValueAsFloatArray ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a float[]

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getFloatArrayValue().

short com.latencybusters.pdm.PDMMessage.getFieldValueAsInt16 ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a short

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getInt16Value().

short [] com.latencybusters.pdm.PDMMessage.getFieldValueAsInt16Array ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a short[]

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getInt16ArrayValue().

int com.latencybusters.pdm.PDMMessage.getFieldValueAsInt32 ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as an int

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getInt32Value().

int [] com.latencybusters.pdm.PDMMessage.getFieldValueAsInt32Array ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a int[]

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getInt32ArrayValue().

long com.latencybusters.pdm.PDMMessage.getFieldValueAsInt64 ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a long

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getInt64Value().

long [] com.latencybusters.pdm.PDMMessage.getFieldValueAsInt64Array ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a long[]

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getInt64ArrayValue().

byte com.latencybusters.pdm.PDMMessage.getFieldValueAsInt8 ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a byte

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getInt8Value().

byte [] com.latencybusters.pdm.PDMMessage.getFieldValueAsInt8Array ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a byte[]

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getInt8ArrayValue().

PDMMessage com.latencybusters.pdm.PDMMessage.getFieldValueAsMessage ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a PDMMessage

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getMessageValue().

PDMMessage [] com.latencybusters.pdm.PDMMessage.getFieldValueAsMessageArray ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a PDMMessage[]

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getMessageArrayValue().

String com.latencybusters.pdm.PDMMessage.getFieldValueAsString ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a String

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getStringValue().

String [] com.latencybusters.pdm.PDMMessage.getFieldValueAsStringArray ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a String[]

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getStringArrayValue().

PDMTimestamp com.latencybusters.pdm.PDMMessage.getFieldValueAsTimestamp ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a PDMTimestamp

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getTimestampValue().

PDMTimestamp [] com.latencybusters.pdm.PDMMessage.getFieldValueAsTimestampArray ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a PDMTimestamp[]

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getTimestampArrayValue().

int com.latencybusters.pdm.PDMMessage.getFieldValueAsUInt16 ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as an int (UInt16)

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getUInt16Value().

int [] com.latencybusters.pdm.PDMMessage.getFieldValueAsUInt16Array ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a int[]

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getUInt16ArrayValue().

long com.latencybusters.pdm.PDMMessage.getFieldValueAsUInt32 ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a long (UInt32)

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getUInt32Value().

long [] com.latencybusters.pdm.PDMMessage.getFieldValueAsUInt32Array ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a long[]

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getUInt32ArrayValue().

BigInteger com.latencybusters.pdm.PDMMessage.getFieldValueAsUInt64 ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a BigInteger

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getUInt64Value().

BigInteger [] com.latencybusters.pdm.PDMMessage.getFieldValueAsUInt64Array ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a BigInteger[]

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getUInt64ArrayValue().

short com.latencybusters.pdm.PDMMessage.getFieldValueAsUInt8 ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a short (UInt8)

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getUInt8Value().

short [] com.latencybusters.pdm.PDMMessage.getFieldValueAsUInt8Array ( PDMFieldInfo  fieldInfo)

Gets the field value by using the PDMFieldInfo handle from the PDMDefinition as a short[]

Parameters
fieldInfothe PDMFieldInfo handle
Returns
the value

References com.latencybusters.pdm.PDMField.getUInt8ArrayValue().

boolean com.latencybusters.pdm.PDMMessage.isFieldValueSet ( PDMFieldInfo  fieldInfo)

Checks to see if the field's value is set

Parameters
fieldInfothe corresponding field info handle
Returns
true if the field value has been set or false if it has not
boolean com.latencybusters.pdm.PDMMessage.isIncludeDefinition ( )

Returns whether the PDMDefinition will be included when serializing to bytes (defaults to false)

Returns
true if it will be included

Referenced by com.latencybusters.pdm.PDMMessage.getMessageLen().

boolean com.latencybusters.pdm.PDMMessage.isTryToLoadDefFromCache ( )

Returns whether or not an attempt will be made when parsing a message to try to automatically loaded a PDMDefinition from the PDMDefinitionCache if the one currently set doesn't exactly match the one in the incoming message; the current one will be replaced (defaults to false)

Returns
true if an attempt will be made to try to load the PDMDefinition
boolean com.latencybusters.pdm.PDMMessage.isUseMsgDefIfNeeded ( )

Returns whether an included PDMDefinition should be parsed and used instead of the previously set PDMDefinition in cases where the two ids, major versions, and minor versions do not match exactly (defaults to false)

Returns
true if the included PDMDefinition can be parsed and used
void com.latencybusters.pdm.PDMMessage.loadDefinition ( PDMDefinition  definition)

Loads the PDMDefinition passed and initializes the PDMMessage

Parameters
definitionthe PDMDefinition to load

Referenced by com.latencybusters.pdm.PDMMessage.getMessageLen(), and com.latencybusters.pdm.PDMMessage.PDMMessage().

int com.latencybusters.pdm.PDMMessage.parse ( byte[]  ba)

Deserializes a message from a byte array

Parameters
bathe byte array
Returns
the updated position in the byte array after parsing this object

Referenced by com.latencybusters.pdm.PDMField.getMessageArrayValue(), com.latencybusters.pdm.PDMField.getMessageValue(), and com.latencybusters.pdm.PDMMessage.parse().

int com.latencybusters.pdm.PDMMessage.parse ( byte[]  ba,
int  pos 
)

Deserializes a message from a byte array at position

Parameters
bathe byte array
posthe starting position
Returns
the updated position in the byte array after parsing

References com.latencybusters.pdm.PDMMessage.parse().

int com.latencybusters.pdm.PDMMessage.parse ( PDMDeserializer  deser,
byte[]  ba,
int  pos 
)

Deserializes a message from a byte array at position

Parameters
deserthe PDMDeserializer to use
bathe byte array
posthe starting position
Returns
the updated position in the byte array after parsing
PDMMessage com.latencybusters.pdm.PDMMessage.removeFieldValue ( PDMFieldInfo  fieldInfo)

Removes the field value (corresponding to the passed field info) from the message

Parameters
fieldInfothe PDMFieldInfo of the field to remove
Returns
this PDMMessage for chaining
PDMMessage com.latencybusters.pdm.PDMMessage.setFieldValue ( PDMFieldInfo  fieldInfo,
boolean  value 
)

Sets the field value in the message using the PDMFieldInfo handle and should be of type PDMFieldType.Boolean.

Parameters
fieldInfothe PDMFieldInfo handle
valuethe boolean value
Returns
a reference to this PDMMessage for chaining setFieldValue calls

References com.latencybusters.pdm.PDMField.setValue(), and com.latencybusters.pdm.PDMMessage.updateOptOrVarFlag().

PDMMessage com.latencybusters.pdm.PDMMessage.setFieldValue ( PDMFieldInfo  fieldInfo,
byte  value 
)

Sets the field value in the message using the PDMFieldInfo handle and should be of type PDMFieldType.INT8.

Parameters
fieldInfothe PDMFieldInfo handle
valuethe byte value
Returns
a reference to this PDMMessage for chaining setFieldValue calls

References com.latencybusters.pdm.PDMField.setValue(), and com.latencybusters.pdm.PDMMessage.updateOptOrVarFlag().

PDMMessage com.latencybusters.pdm.PDMMessage.setFieldValue ( PDMFieldInfo  fieldInfo,
short  value 
)

Sets the field value in the message using the PDMFieldInfo handle and should be of type PDMFieldType.UINT8 or PDMFieldType.INT16.

Parameters
fieldInfothe PDMFieldInfo handle
valuethe ubyte (as a short) or short value
Returns
a reference to this PDMMessage for chaining setFieldValue calls

References com.latencybusters.pdm.PDMField.setValue(), and com.latencybusters.pdm.PDMMessage.updateOptOrVarFlag().

PDMMessage com.latencybusters.pdm.PDMMessage.setFieldValue ( PDMFieldInfo  fieldInfo,
int  value 
)

Sets the field value in the message using the PDMFieldInfo handle and should be of type PDMFieldType.UINT16 or PDMFieldType.INT32.

Parameters
fieldInfothe PDMFieldInfo handle
valuethe ushort (as an int) or int value
Returns
a reference to this PDMMessage for chaining setFieldValue calls

References com.latencybusters.pdm.PDMField.setValue(), and com.latencybusters.pdm.PDMMessage.updateOptOrVarFlag().

PDMMessage com.latencybusters.pdm.PDMMessage.setFieldValue ( PDMFieldInfo  fieldInfo,
long  value 
)

Sets the field value in the message using the PDMFieldInfo handle and should be of type PDMFieldType.UINT32 or PDMFieldType.INT64.

Parameters
fieldInfothe PDMFieldInfo handle
valuethe uint (as a long) or long value
Returns
a reference to this PDMMessage for chaining setFieldValue calls

References com.latencybusters.pdm.PDMField.setValue(), and com.latencybusters.pdm.PDMMessage.updateOptOrVarFlag().

PDMMessage com.latencybusters.pdm.PDMMessage.setFieldValue ( PDMFieldInfo  fieldInfo,
BigInteger  value 
)

Sets the field value in the message using the PDMFieldInfo handle and should be of type PDMFieldType.UINT64.

Parameters
fieldInfothe PDMFieldInfo handle
valuethe ulong (as a BigInteger) value
Returns
a reference to this PDMMessage for chaining setFieldValue calls

References com.latencybusters.pdm.PDMField.setValue(), and com.latencybusters.pdm.PDMMessage.updateOptOrVarFlag().

PDMMessage com.latencybusters.pdm.PDMMessage.setFieldValue ( PDMFieldInfo  fieldInfo,
float  value 
)

Sets the field value in the message using the PDMFieldInfo handle and should be of type PDMFieldType.FLOAT.

Parameters
fieldInfothe PDMFieldInfo handle
valuethe float value
Returns
a reference to this PDMMessage for chaining setFieldValue calls

References com.latencybusters.pdm.PDMField.setValue(), and com.latencybusters.pdm.PDMMessage.updateOptOrVarFlag().

PDMMessage com.latencybusters.pdm.PDMMessage.setFieldValue ( PDMFieldInfo  fieldInfo,
double  value 
)

Sets the field value in the message using the PDMFieldInfo handle and should be of type PDMFieldType.DOUBLE.

Parameters
fieldInfothe PDMFieldInfo handle
valuethe double value
Returns
a reference to this PDMMessage for chaining setFieldValue calls

References com.latencybusters.pdm.PDMField.setValue(), and com.latencybusters.pdm.PDMMessage.updateOptOrVarFlag().

PDMMessage com.latencybusters.pdm.PDMMessage.setFieldValue ( PDMFieldInfo  fieldInfo,
PDMDecimal  value 
)

Sets the field value in the message using the PDMFieldInfo handle and should be of type PDMFieldType.DECIMAL.

Parameters
fieldInfothe PDMFieldInfo handle
valuethe PDMDecimal value
Returns
a reference to this PDMMessage for chaining setFieldValue calls

References com.latencybusters.pdm.PDMField.setValue(), and com.latencybusters.pdm.PDMMessage.updateOptOrVarFlag().

PDMMessage com.latencybusters.pdm.PDMMessage.setFieldValue ( PDMFieldInfo  fieldInfo,
PDMTimestamp  value 
)

Sets the field value in the message using the PDMFieldInfo handle and should be of type PDMFieldType.Timestamp.

Parameters
fieldInfothe PDMFieldInfo handle
valuethe PDMTimestamp value
Returns
a reference to this PDMMessage for chaining setFieldValue calls

References com.latencybusters.pdm.PDMField.setValue(), and com.latencybusters.pdm.PDMMessage.updateOptOrVarFlag().

PDMMessage com.latencybusters.pdm.PDMMessage.setFieldValue ( PDMFieldInfo  fieldInfo,
String  value 
)

Sets the field value in the message using the PDMFieldInfo handle and should be of type PDMFieldType.FIX_STRING or PDMFieldType.STRING or PDMFieldType.FIX_UNICODE or PDMFieldType.UNICODE.

Parameters
fieldInfothe PDMFieldInfo handle
valuethe String value
Returns
a reference to this PDMMessage for chaining setFieldValue calls

References com.latencybusters.pdm.PDMField.setValue(), and com.latencybusters.pdm.PDMMessage.updateOptOrVarFlag().

PDMMessage com.latencybusters.pdm.PDMMessage.setFieldValue ( PDMFieldInfo  fieldInfo,
PDMMessage  value 
)

Sets the field value in the message using the PDMFieldInfo handle and should be of type PDMFieldType.MESSAGE.

Parameters
fieldInfothe PDMFieldInfo handle
valuethe PDMMessage value
Returns
a reference to this PDMMessage for chaining setFieldValue calls

References com.latencybusters.pdm.PDMField.setValue(), and com.latencybusters.pdm.PDMMessage.updateOptOrVarFlag().

PDMMessage com.latencybusters.pdm.PDMMessage.setFieldValue ( PDMFieldInfo  fieldInfo,
boolean[]  value 
)

Sets the field value in the message using the PDMFieldInfo handle and should be of type PDMFieldType.BOOLEAN_ARR.

Parameters
fieldInfothe PDMFieldInfo handle
valuethe boolean array value
Returns
a reference to this PDMMessage for chaining setFieldValue calls

References com.latencybusters.pdm.PDMField.setValue(), and com.latencybusters.pdm.PDMMessage.updateOptOrVarFlag().

PDMMessage com.latencybusters.pdm.PDMMessage.setFieldValue ( PDMFieldInfo  fieldInfo,
byte[]  value 
)

Sets the field value in the message using the PDMFieldInfo handle and should be of type PDMFieldType.INT8_ARR or PDMFieldType.BLOB.

Parameters
fieldInfothe PDMFieldInfo handle
valuethe byte array value
Returns
a reference to this PDMMessage for chaining setFieldValue calls

References com.latencybusters.pdm.PDMField.setValue(), and com.latencybusters.pdm.PDMMessage.updateOptOrVarFlag().

PDMMessage com.latencybusters.pdm.PDMMessage.setFieldValue ( PDMFieldInfo  fieldInfo,
short[]  value 
)

Sets the field value in the message using the PDMFieldInfo handle and should be of type PDMFieldType.UINT8_ARR or PDMFieldType.INT16_ARR.

Parameters
fieldInfothe PDMFieldInfo handle
valuethe ubtye (as a short) or short array value
Returns
a reference to this PDMMessage for chaining setFieldValue calls

References com.latencybusters.pdm.PDMField.setValue(), and com.latencybusters.pdm.PDMMessage.updateOptOrVarFlag().

PDMMessage com.latencybusters.pdm.PDMMessage.setFieldValue ( PDMFieldInfo  fieldInfo,
int[]  value 
)

Sets the field value in the message using the PDMFieldInfo handle and should be of type PDMFieldType.UINT16_ARR or PDMFieldType.INT32_ARR.

Parameters
fieldInfothe PDMFieldInfo handle
valuethe ushort (as an int) or int array value
Returns
a reference to this PDMMessage for chaining setFieldValue calls

References com.latencybusters.pdm.PDMField.setValue(), and com.latencybusters.pdm.PDMMessage.updateOptOrVarFlag().

PDMMessage com.latencybusters.pdm.PDMMessage.setFieldValue ( PDMFieldInfo  fieldInfo,
long[]  value 
)

Sets the field value in the message using the PDMFieldInfo handle and should be of type PDMFieldType.UINT32_ARR or PDMFieldType.INT64_ARR.

Parameters
fieldInfothe PDMFieldInfo handle
valuethe uint (as a long) or long array value
Returns
a reference to this PDMMessage for chaining setFieldValue calls

References com.latencybusters.pdm.PDMField.setValue(), and com.latencybusters.pdm.PDMMessage.updateOptOrVarFlag().

PDMMessage com.latencybusters.pdm.PDMMessage.setFieldValue ( PDMFieldInfo  fieldInfo,
BigInteger[]  value 
)

Sets the field value in the message using the PDMFieldInfo handle and should be of type PDMFieldType.UINT64_ARR.

Parameters
fieldInfothe PDMFieldInfo handle
valuethe ulong (as a BigInteger) array value
Returns
a reference to this PDMMessage for chaining setFieldValue calls

References com.latencybusters.pdm.PDMField.setValue(), and com.latencybusters.pdm.PDMMessage.updateOptOrVarFlag().

PDMMessage com.latencybusters.pdm.PDMMessage.setFieldValue ( PDMFieldInfo  fieldInfo,
float[]  value 
)

Sets the field value in the message using the PDMFieldInfo handle and should be of type PDMFieldType.FLOAT_ARR.

Parameters
fieldInfothe PDMFieldInfo handle
valuethe float array value
Returns
a reference to this PDMMessage for chaining setFieldValue calls

References com.latencybusters.pdm.PDMField.setValue(), and com.latencybusters.pdm.PDMMessage.updateOptOrVarFlag().

PDMMessage com.latencybusters.pdm.PDMMessage.setFieldValue ( PDMFieldInfo  fieldInfo,
double[]  value 
)

Sets the field value in the message using the PDMFieldInfo handle and should be of type PDMFieldType.DOUBLE_ARR.

Parameters
fieldInfothe PDMFieldInfo handle
valuethe double array value
Returns
a reference to this PDMMessage for chaining setFieldValue calls

References com.latencybusters.pdm.PDMField.setValue(), and com.latencybusters.pdm.PDMMessage.updateOptOrVarFlag().

PDMMessage com.latencybusters.pdm.PDMMessage.setFieldValue ( PDMFieldInfo  fieldInfo,
PDMDecimal[]  value 
)

Sets the field value in the message using the PDMFieldInfo handle and should be of type PDMFieldType.DECIMAL_ARR.

Parameters
fieldInfothe PDMFieldInfo handle
valuethe PDMDecimal array value
Returns
a reference to this PDMMessage for chaining setFieldValue calls

References com.latencybusters.pdm.PDMField.setValue(), and com.latencybusters.pdm.PDMMessage.updateOptOrVarFlag().

PDMMessage com.latencybusters.pdm.PDMMessage.setFieldValue ( PDMFieldInfo  fieldInfo,
PDMTimestamp[]  value 
)

Sets the field value in the message using the PDMFieldInfo handle and should be of type PDMFieldType.TIMESTAMP_ARR.

Parameters
fieldInfothe PDMFieldInfo handle
valuethe PDMTimestamp array value
Returns
a reference to this PDMMessage for chaining setFieldValue calls

References com.latencybusters.pdm.PDMField.setValue(), and com.latencybusters.pdm.PDMMessage.updateOptOrVarFlag().

PDMMessage com.latencybusters.pdm.PDMMessage.setFieldValue ( PDMFieldInfo  fieldInfo,
String[]  value 
)

Sets the field value in the message using the PDMFieldInfo handle and should be of type PDMFieldType.FIX_STRING_ARR or PDMFieldType.STRING_ARR or PDMFieldType.FIX_UNICODE_ARR or PDMFieldType.UNICODE_ARR.

Parameters
fieldInfothe PDMFieldInfo handle
valuethe PDMMessage array value
Returns
a reference to this PDMMessage for chaining setFieldValue calls

References com.latencybusters.pdm.PDMField.setValue(), and com.latencybusters.pdm.PDMMessage.updateOptOrVarFlag().

PDMMessage com.latencybusters.pdm.PDMMessage.setFieldValue ( PDMFieldInfo  fieldInfo,
byte  value[][] 
)

Sets the field value in the message using the PDMFieldInfo handle and should be of type PDMFieldType.BLOB_ARR.

Parameters
fieldInfothe PDMFieldInfo handle
valuethe byte[] array value
Returns
a reference to this PDMMessage for chaining setFieldValue calls

References com.latencybusters.pdm.PDMField.setValue(), and com.latencybusters.pdm.PDMMessage.updateOptOrVarFlag().

PDMMessage com.latencybusters.pdm.PDMMessage.setFieldValue ( PDMFieldInfo  fieldInfo,
PDMMessage[]  value 
)

Sets the field value in the message using the PDMFieldInfo handle and should be of type PDMFieldType.MESSAGE_ARR.

Parameters
fieldInfothe PDMFieldInfo handle
valuethe PDMMessage array value
Returns
a reference to this PDMMessage for chaining setFieldValue calls

References com.latencybusters.pdm.PDMField.setValue(), and com.latencybusters.pdm.PDMMessage.updateOptOrVarFlag().

void com.latencybusters.pdm.PDMMessage.setIncludeDefinition ( boolean  includeDefinition)

Sets whether the PDMDefinition will be included when serializing to bytes (defaults to false)

Parameters
includeDefinition

Referenced by com.latencybusters.pdm.PDMField.setValue().

void com.latencybusters.pdm.PDMMessage.setTryToLoadDefFromCache ( boolean  tryToLoadDefFromCache)

Sets whether or not an attempt will be made when parsing a message to try to automatically loaded a PDMDefinition from the PDMDefinitionCache if the one currently set doesn't exactly match the one in the incoming message; the current one will be replaced (defaults to false)

Parameters
tryToLoadDefFromCache
void com.latencybusters.pdm.PDMMessage.setUseMsgDefIfNeeded ( boolean  useMsgDefIfNeeded)

Sets whether an included PDMDefinition should be parsed and used instead of the previously set PDMDefinition in cases where the two ids, major versions, and minor versions do not match exactly (defaults to false)

Parameters
useMsgDefIfNeeded
byte [] com.latencybusters.pdm.PDMMessage.toBytes ( )

Serializes the message to a new byte array

Returns
the new byte array

Referenced by com.latencybusters.pdm.PDMMessage.getMessageLen(), and com.latencybusters.pdm.PDMMessage.toBytes().

byte [] com.latencybusters.pdm.PDMMessage.toBytes ( PDMSerializer  ser)

Serializes the message to a new byte array

Parameters
serthe PDMSerializer to use
Returns
the new byte array

References com.latencybusters.pdm.PDMMessage.toBytes().

int com.latencybusters.pdm.PDMMessage.toBytes ( PDMSerializer  ser,
byte[]  ba,
int  pos 
)

Serializes the message to an existing byte array at position

Parameters
serthe PDMSerializer to use
bathe byte array
posthe starting position
Returns
the updated position in the byte array after serializing this object

References com.latencybusters.pdm.PDMMessage.toBytes().

void com.latencybusters.pdm.PDMMessage.updateOptOrVarFlag ( PDMField  field)

Used internally to update the flag if needed to indicate that the message contains at least one optional or variable field

Parameters
fieldthe field to check

References com.latencybusters.pdm.PDMMessage.getMessageLen().

Referenced by com.latencybusters.pdm.PDMMessage.setFieldValue().


The documentation for this class was generated from the following file: