UM Java API 6.17.1

- Main Page
- Related Pages
- Classes

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
com.latencybusters.lbm.sdm.LBMSDMFields Class Reference
Inheritance diagram for com.latencybusters.lbm.sdm.LBMSDMFields:

## Public Member Functions
| LBMSDMFields ()
| LBMSDMFields (LBMSDMFieldsAttribute user_attr)
void | add (LBMSDMField newfield) throws LBMSDMException
void | set (LBMSDMField field) throws LBMSDMException
void | set (LBMSDMField field, int idx) throws LBMSDMException
void | set (LBMSDMField newfield, int fieldidx, int arrayidx) throws LBMSDMException
int | length ()
LBMSDMField | get (int pos)
LBMSDMFieldsAttribute | get_attr ()
void | remove (int pos)
void | remove (String name)
Iterator | iterator ()
String | toString ()
String | toDbgString ()
LBMSDMFields | clone () throws CloneNotSupportedException
LBMSDMField | locate (String name)
void | set_debug_level (int level)
void | log (String s)

## Static Public Attributes
static final int | DEBUG_BASIC = 1
static final int | DEBUG_VERBOSE_PARSING = 2

## Protected Attributes
int | debug_level = 0

## Detailed Description

LBMSDMFields is a utility class for LBMSDMessage to collect a set of fields. The intent of separating the set of fields from LBMSDMessage is to encourage reuse of the field set.

## Constructor & Destructor Documentation

com.latencybusters.lbm.sdm.LBMSDMFields.LBMSDMFields | ( |  | ) |

Constructor for an empty field set.

Referenced by com.latencybusters.lbm.sdm.LBMSDMFields.clone().

com.latencybusters.lbm.sdm.LBMSDMFields.LBMSDMFields | ( | LBMSDMFieldsAttribute | user_attr | ) |

Constructor for an empty field set.

Parameters

  user_attr | User attribute object setting options for this field set

References com.latencybusters.lbm.sdm.LBMSDMFieldsAttribute.clone(), and com.latencybusters.lbm.sdm.LBMSDM.log().

## Member Function Documentation

void com.latencybusters.lbm.sdm.LBMSDMFields.add | ( | LBMSDMField | newfield | ) | throws LBMSDMException

Add an SDM field to the field set

Parameters

  newfield | The new field to be added

Exceptions

  LBMSDMDuplicateFieldException | when adding a field with the same name as a field already in the field set
  LBMSDMException | when an unexpected error occurs within LBMSDM

References com.latencybusters.lbm.sdm.LBMSDMField.length(), and com.latencybusters.lbm.sdm.LBMSDMFields.locate().

Referenced by com.latencybusters.lbm.sdm.LBMSDMessage.add().

LBMSDMFields com.latencybusters.lbm.sdm.LBMSDMFields.clone | ( |  | ) | throws CloneNotSupportedException

Get a copy of this object

Returns
  A new object with a copy

References com.latencybusters.lbm.sdm.LBMSDMFields.clone(), com.latencybusters.lbm.sdm.LBMSDMFields.LBMSDMFields(), and com.latencybusters.lbm.sdm.LBMSDMField.length().

Referenced by com.latencybusters.lbm.sdm.LBMSDMFields.clone(), and com.latencybusters.lbm.sdm.LBMSDMessage.clone().

LBMSDMField com.latencybusters.lbm.sdm.LBMSDMFields.get | ( | int | pos | ) |

Get a field by the index

Parameters

  pos | The index of the field required

Returns
  The LBMSDMField object

Referenced by com.latencybusters.lbm.sdm.LBMSDMFieldIterator.get(), and com.latencybusters.lbm.sdm.LBMSDMessage.get().

LBMSDMFieldsAttribute com.latencybusters.lbm.sdm.LBMSDMFields.get_attr | ( |  | ) |

Get the field set attributes are associated with this message A copy is returned

Returns
  LBMSDMFieldsAttribute object

References com.latencybusters.lbm.sdm.LBMSDMFieldsAttribute.clone(), and com.latencybusters.lbm.sdm.LBMSDM.log().

Referenced by com.latencybusters.lbm.sdm.LBMSDMessage.get_attr().

Iterator com.latencybusters.lbm.sdm.LBMSDMFields.iterator | ( |  | ) |

Get the default iterator for this field set

Returns
  An Iterator of type LBMSDMFieldIterator

int com.latencybusters.lbm.sdm.LBMSDMFields.length | ( |  | ) |

Get the number of fields in the field set

Returns
  The number of fields in the field set

Referenced by com.latencybusters.lbm.sdm.LBMSDMessage.count(), com.latencybusters.lbm.sdm.LBMSDMessage.data(), and com.latencybusters.lbm.sdm.LBMSDMFieldIterator.hasNext().

LBMSDMField com.latencybusters.lbm.sdm.LBMSDMFields.locate | ( | String | name | ) |

Get a field in the field set based on the name. Note calling locate() many times on the same message is not optimal. When processing multiple fields in a message, looping through by index and comparing the name may be more efficient, eliminating unnecessary string compares.

Parameters

  name | The name of the field to be searched for.

Returns
  the LBMSDMField or null

References com.latencybusters.lbm.sdm.LBMSDMField.get_name(), com.latencybusters.lbm.sdm.LBMSDMFieldIterator.hasNext(), and com.latencybusters.lbm.sdm.LBMSDMFieldIterator.next().

Referenced by com.latencybusters.lbm.sdm.LBMSDMFields.add(), and com.latencybusters.lbm.sdm.LBMSDMessage.locate().

void com.latencybusters.lbm.sdm.LBMSDM.log | ( | String | s | ) |
| inherited

Log an event. If debug level is set greater than 0, output to stderr

Referenced by com.latencybusters.lbm.sdm.LBMSDMFields.get_attr(), com.latencybusters.lbm.sdm.LBMSDMFields.LBMSDMFields(), com.latencybusters.lbm.sdm.LBMSDMFieldBlob.set(), com.latencybusters.lbm.sdm.LBMSDMFieldMessage.set(), com.latencybusters.lbm.sdm.LBMSDMFieldDecimal.set(), com.latencybusters.lbm.sdm.LBMSDMFieldTimestamp.set(), com.latencybusters.lbm.sdm.LBMSDMArrayDecimal.set(), and com.latencybusters.lbm.sdm.LBMSDMArrayUint64.set().

void com.latencybusters.lbm.sdm.LBMSDMFields.remove | ( | int | pos | ) |

Remove a field by specifying the index

Parameters

  pos | The index of the field

References com.latencybusters.lbm.sdm.LBMSDMField.length().

Referenced by com.latencybusters.lbm.sdm.LBMSDMFieldIterator.remove(), and com.latencybusters.lbm.sdm.LBMSDMessage.remove().

void com.latencybusters.lbm.sdm.LBMSDMFields.remove | ( | String | name | ) |

Remove a field by specifying the name

Parameters

  name | The field name to be removed

void com.latencybusters.lbm.sdm.LBMSDMFields.set | ( | LBMSDMField | field | ) | throws LBMSDMException

Overwrite/set an existing field based on the name

Parameters

  field | The new field value

Exceptions

  LBMSDMAddingFieldException | when the field doesn't exist

Referenced by com.latencybusters.lbm.sdm.LBMSDMFieldIterator.set(), and com.latencybusters.lbm.sdm.LBMSDMessage.set().

void com.latencybusters.lbm.sdm.LBMSDMFields.set | ( | LBMSDMField | field,
|  | int | idx
| ) |  | throws LBMSDMException

Overwrite/set an existing field based on the field set index

Parameters

  field | The new field value
  idx | The index into the field set of the field

Exceptions

  LBMSDMAddingFieldException | when the field doesn't exist
  LBMSDMTypeMismatchException | when the field isnt the same type as the element

References com.latencybusters.lbm.sdm.LBMSDMField.get_name().

void com.latencybusters.lbm.sdm.LBMSDMFields.set | ( | LBMSDMField | newfield,
|  | int | fieldidx,
|  | int | arrayidx
| ) |  | throws LBMSDMException

Overwrite/set an existing field based on the field set index and array element

Parameters

  newfield | The new field value
  fieldidx | The index into the field set of the field
  arrayidx | The element in the array to be set

Exceptions

  LBMSDMAddingFieldException | when the field doesn't exist
  LBMSDMTypeMismatchException | when the field isnt the same type as the element

References com.latencybusters.lbm.sdm.LBMSDMField.set().

void com.latencybusters.lbm.sdm.LBMSDM.set_debug_level | ( | int | level | ) |
| inherited

Set the debug level for processing this SDM message. Currently all debugs go to standard out.

String com.latencybusters.lbm.sdm.LBMSDMFields.toDbgString | ( |  | ) |

Dump the internal representation of this field set which includes the fields.

Returns
  A string

References com.latencybusters.lbm.sdm.LBMSDMField.toDbgString().

Referenced by com.latencybusters.lbm.sdm.LBMSDMessage.toDbgString(), and com.latencybusters.lbm.sdm.LBMSDMessage.toString().

String com.latencybusters.lbm.sdm.LBMSDMFields.toString | ( |  | ) |

Dump the string representation of this field set which includes the fields.

Returns
  A string

## Member Data Documentation

final int com.latencybusters.lbm.sdm.LBMSDM.DEBUG_BASIC = 1
| static inherited

Debug flag for basic debug output

int com.latencybusters.lbm.sdm.LBMSDM.debug_level = 0
| protected inherited

Debug mask for SDM implementation.

See also
  set_debug_level

Referenced by com.latencybusters.lbm.sdm.LBMSDMessage.data(), com.latencybusters.lbm.sdm.LBMSDMessage.parse(), com.latencybusters.lbm.sdm.LBMSDMFieldMessage.parse(), and com.latencybusters.lbm.sdm.LBMSDMArrayMessage.parse().

final int com.latencybusters.lbm.sdm.LBMSDM.DEBUG_VERBOSE_PARSING = 2
| static inherited

Debug flag for verbose message parsing output

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

- LBMSDMFields.java