UM Java API 6.17.1

- Main Page
- Related Pages
- Classes

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
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< PDMField > | getFields ()
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

  definition | The 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

  definitionId | The 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the 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

  fieldInfo | the PDMFieldInfo handle

Returns
  the value

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

int com.latencybusters.pdm.PDMMessage.getMessageLen | ( |  | ) |

Gets the message length in bytes which is known after it has been serialized

Returns
  the message length in bytes

References com.latencybusters.pdm.PDMDefinition.calcLen(), com.latencybusters.pdm.PDMDefinition.compareTo(), com.latencybusters.pdm.PDMDefinition.compareToWithVersion(), com.latencybusters.pdm.PDMDefinitionCache.get(), com.latencybusters.pdm.PDMDefinition.getFieldInfoById(), com.latencybusters.pdm.PDMDefinition.getFixedRequiredLen(), com.latencybusters.pdm.PDMField.getLenIncludingHeader(), com.latencybusters.pdm.PDMDeserializer.isByteSwap(), com.latencybusters.pdm.PDMMessage.isIncludeDefinition(), com.latencybusters.pdm.PDMMessage.loadDefinition(), com.latencybusters.pdm.PDMDefinition.parse(), com.latencybusters.pdm.PDMDeserializer.readInt(), com.latencybusters.pdm.PDMDefinition.toBytes(), com.latencybusters.pdm.PDMMessage.toBytes(), and com.latencybusters.pdm.PDMSerializer.writeByteArray().

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

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

Checks to see if the field's value is set

Parameters

  fieldInfo | the 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

  definition | the 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

  ba | the 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

  ba | the byte array
  pos | the 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

  deser | the PDMDeserializer to use
  ba | the byte array
  pos | the 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

  fieldInfo | the 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

  fieldInfo | the PDMFieldInfo handle
  value | the 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

  fieldInfo | the PDMFieldInfo handle
  value | the 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

  fieldInfo | the PDMFieldInfo handle
  value | the 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

  fieldInfo | the PDMFieldInfo handle
  value | the 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

  fieldInfo | the PDMFieldInfo handle
  value | the 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

  fieldInfo | the PDMFieldInfo handle
  value | the 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

  fieldInfo | the PDMFieldInfo handle
  value | the 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

  fieldInfo | the PDMFieldInfo handle
  value | the 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

  fieldInfo | the PDMFieldInfo handle
  value | the 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

  fieldInfo | the PDMFieldInfo handle
  value | the 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

  fieldInfo | the PDMFieldInfo handle
  value | the 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

  fieldInfo | the PDMFieldInfo handle
  value | the 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

  fieldInfo | the PDMFieldInfo handle
  value | the 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

  fieldInfo | the PDMFieldInfo handle
  value | the 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

  fieldInfo | the PDMFieldInfo handle
  value | the 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

  fieldInfo | the PDMFieldInfo handle
  value | the 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

  fieldInfo | the PDMFieldInfo handle
  value | the 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

  fieldInfo | the PDMFieldInfo handle
  value | the 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

  fieldInfo | the PDMFieldInfo handle
  value | the 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

  fieldInfo | the PDMFieldInfo handle
  value | the 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

  fieldInfo | the PDMFieldInfo handle
  value | the 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

  fieldInfo | the PDMFieldInfo handle
  value | the 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

  fieldInfo | the PDMFieldInfo handle
  value | the 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

  fieldInfo | the PDMFieldInfo handle
  value | the 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

  fieldInfo | the PDMFieldInfo handle
  value | the 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

  ser | the 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

  ser | the PDMSerializer to use
  ba | the byte array
  pos | the 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

  field | the 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:

- PDMMessage.java