UM Java API  6.16.1
com.latencybusters.lbm.sdm.LBMSDMFields Class Reference
Inheritance diagram for com.latencybusters.lbm.sdm.LBMSDMFields:
com.latencybusters.lbm.sdm.LBMSDM

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_attrUser 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
newfieldThe new field to be added
Exceptions
LBMSDMDuplicateFieldExceptionwhen adding a field with the same name as a field already in the field set
LBMSDMExceptionwhen 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
LBMSDMField com.latencybusters.lbm.sdm.LBMSDMFields.get ( int  pos)

Get a field by the index

Parameters
posThe 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
nameThe 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.LBMSDMFields.remove ( int  pos)

Remove a field by specifying the index

Parameters
posThe 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
nameThe 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
fieldThe new field value
Exceptions
LBMSDMAddingFieldExceptionwhen 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
fieldThe new field value
idxThe index into the field set of the field
Exceptions
LBMSDMAddingFieldExceptionwhen the field doesn't exist
LBMSDMTypeMismatchExceptionwhen 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
newfieldThe new field value
fieldidxThe index into the field set of the field
arrayidxThe element in the array to be set
Exceptions
LBMSDMAddingFieldExceptionwhen the field doesn't exist
LBMSDMTypeMismatchExceptionwhen 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
staticinherited

Debug flag for basic debug output

int com.latencybusters.lbm.sdm.LBMSDM.debug_level = 0
protectedinherited
final int com.latencybusters.lbm.sdm.LBMSDM.DEBUG_VERBOSE_PARSING = 2
staticinherited

Debug flag for verbose message parsing output


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