UM Java API  6.16.1
com.latencybusters.lbm.LBMContext Class Reference
Inheritance diagram for com.latencybusters.lbm.LBMContext:

Public Member Functions

 LBMContext () throws LBMException
 
 LBMContext (LBMContextAttributes lbmcattr) throws LBMException
 
void setAuthCredentials (LBMAuthUserInfo userInfo, LBMAuthCredentialsCallback authCallback, Object cbArg) throws LBMException
 
void close ()
 
LBMConfigOption[] dumpAttributeList ()
 
String getAttributeValue (String attributeName) throws LBMException
 
void setAttributeValue (String attributeName, String attributeValue) throws LBMException
 
Object setProperty (String attributeName, String attributeValue)
 
void load (InputStream inStream) throws IOException
 
void processEvents (long msec) throws LBMException
 
void processEvents (long msec, int flags) throws LBMException
 
void processEvents (long msec, int flags, long tv_sec, long tv_usec) throws LBMException
 
void unblockProcessEvents () throws LBMException
 
LBMTopic lookupTopic (String symbol) throws LBMException
 
LBMTopic lookupTopic (String symbol, LBMReceiverAttributes lbmrattr) throws LBMException
 
LBMTopic allocTopic (String symbol) throws LBMException
 
LBMTopic allocTopic (String symbol, LBMSourceAttributes lbmsattr) throws LBMException
 
void enableImmediateMessageReceiver () throws LBMException
 
void enableImmediateMessageReceiver (LBMEventQueue lbmevq) throws LBMException
 
void addImmediateMessageReceiver (LBMImmediateMessageCallback cb)
 
void addImmediateMessageReceiver (LBMImmediateMessageCallback cb, Object cbArg)
 
void removeImmediateMessageReceiver (LBMImmediateMessageCallback cb)
 
void removeImmediateMessageReceiver (LBMImmediateMessageCallback cb, Object cbArg)
 
void send (String target, String topic, byte[] data, int dataLength, int flags) throws LBMException
 
void sendTopicless (String target, byte[] data, int dataLength, int flags) throws LBMException
 
void sendc (char[] target, char[] topic, byte[] data, int dataLength, int flags) throws LBMException
 
void sendTopicless (char[] target, byte[] data, int dataLength, int flags) throws LBMException
 
LBMRequest send (String target, String topic, byte[] data, int dataLength, LBMResponseCallback cb, Object cbArg, LBMEventQueue lbmevq, int flags) throws LBMException
 
LBMRequest send (String target, String topic, byte[] data, int dataLength, LBMResponseCallback cb, Object cbArg, int flags) throws LBMException
 
void send (String target, String topic, LBMRequest lbmreq, LBMEventQueue lbmevq, int flags) throws LBMException
 
void send (String target, String topic, LBMRequest lbmreq, int flags) throws LBMException
 
void send (String topic, byte[] data, int dataLength, int flags) throws LBMException
 
void sendc (char[] topic, byte[] data, int dataLength, int flags) throws LBMException
 
void sendTopicless (byte[] data, int dataLength, int flags) throws LBMException
 
LBMRequest send (String topic, byte[] data, int dataLength, LBMResponseCallback cb, Object cbArg, LBMEventQueue lbmevq, int flags) throws LBMException
 
LBMRequest send (String topic, byte[] data, int dataLength, LBMResponseCallback cb, Object cbArg, int flags) throws LBMException
 
void send (String topic, LBMRequest lbmreq, LBMEventQueue lbmevq, int flags) throws LBMException
 
void send (String topic, LBMRequest lbmreq, int flags) throws LBMException
 
void send (String queue, String topic, byte[] data, int datalength, int flags, LBMSourceSendExInfo exinfo) throws LBMException
 
LBMContextStatistics getStatistics () throws LBMException
 
void resetStatistics () throws LBMException
 
LBMSourceStatistics getSourceStatistics (int maxStats) throws LBMException
 
void resetSourceStatistics () throws LBMException
 
LBMReceiverStatistics getReceiverStatistics (int maxStats) throws LBMException
 
void resetReceiverStatistics () throws LBMException
 
LBMImmediateMessageSourceStatistics getImmediateMessageSourceStatistics (int maxStats) throws LBMException
 
void resetImmediateMessageSourceStatistics () throws LBMException
 
LBMImmediateMessageReceiverStatistics getImmediateMessageReceiverStatistics (int maxStats) throws LBMException
 
void resetImmediateMessageReceiverStatistics () throws LBMException
 
int serializeLbmmonControlMessage (ByteBuffer message, int command, String data, int nodeType, String applicationID) throws LBMException
 
LBMTimer createTimer (long milliseconds) throws LBMException
 
LBMTimer createTimer (long milliseconds, LBMEventQueue lbmevq) throws LBMException
 
LBMTimer createTimer (long milliseconds, LBMTimerCallback cb, Object cbArg) throws LBMException
 
LBMTimer createTimer (long milliseconds, LBMTimerCallback cb, Object cbArg, LBMEventQueue lbmevq) throws LBMException
 
LBMTimer scheduleTimer (long milliseconds) throws LBMException
 
LBMTimer scheduleTimer (long milliseconds, LBMEventQueue lbmevq) throws LBMException
 
LBMTimer scheduleTimer (long milliseconds, LBMTimerCallback cb, Object cbArg) throws LBMException
 
LBMTimer scheduleTimer (long milliseconds, LBMTimerCallback cb, Object cbArg, LBMEventQueue lbmevq) throws LBMException
 
LBMSource createSource (LBMTopic lbmtopic) throws LBMException
 
LBMSource createSource (LBMTopic lbmtopic, LBMSourceEventCallback cb, Object cbArg) throws LBMException
 
LBMSource createSource (LBMTopic lbmtopic, LBMEventQueue lbmevq) throws LBMException
 
LBMSource createSource (LBMTopic lbmtopic, LBMSourceEventCallback cb, Object cbArg, LBMEventQueue lbmevq) throws LBMException
 
LBMHotFailoverSource createHotFailoverSource (LBMTopic lbmtopic) throws LBMException
 
LBMHotFailoverSource createHotFailoverSource (LBMTopic lbmtopic, LBMSourceEventCallback cb, Object cbArg) throws LBMException
 
LBMHotFailoverSource createHotFailoverSource (LBMTopic lbmtopic, LBMEventQueue lbmevq) throws LBMException
 
LBMHotFailoverSource createHotFailoverSource (LBMTopic lbmtopic, LBMSourceEventCallback cb, Object cbArg, LBMEventQueue lbmevq) throws LBMException
 
LBMReceiver createReceiver (LBMTopic lbmtopic) throws LBMException
 
LBMReceiver createReceiver (LBMTopic lbmtopic, LBMEventQueue lbmevq) throws LBMException
 
LBMReceiver createReceiver (LBMTopic lbmtopic, LBMReceiverCallback cb, Object cbArg) throws LBMException
 
LBMReceiver createReceiver (LBMTopic lbmtopic, LBMReceiverCallback cb, Object cbArg, LBMEventQueue lbmevq) throws LBMException
 
LBMHotFailoverReceiver createHotFailoverReceiver (LBMTopic lbmtopic) throws LBMException
 
LBMHotFailoverReceiver createHotFailoverReceiver (LBMTopic lbmtopic, LBMEventQueue lbmevq) throws LBMException
 
LBMHotFailoverReceiver createHotFailoverReceiver (LBMTopic lbmtopic, LBMReceiverCallback cb, Object cbArg) throws LBMException
 
LBMHotFailoverReceiver createHotFailoverReceiver (LBMTopic lbmtopic, LBMReceiverCallback cb, Object cbArg, LBMEventQueue lbmevq) throws LBMException
 
void addSourceNotifyCallback (LBMSourceNotification cb) throws LBMException
 
void addSourceNotifyCallback (LBMSourceNotification cb, Object cbArg) throws LBMException
 
void removeSourceNotifyCallback (LBMSourceNotification cb)
 
void removeSourceNotifyCallback (LBMSourceNotification cb, Object cbArg)
 
int getUMQInflight (String queue) throws LBMException
 
int setUMQInflight (String queue, LBMSetInflightCallback setInflightCb, Object clientd) throws LBMException
 
void setUMQMessageStable (String queue, UMQMessageId msg_id) throws LBMException
 
void requestTopicResolution (short flags, long interval_msec, long duration_sec) throws LBMException
 
void queueTopicList (String queue, LBMAsyncOperationCallback asyncOpCb) throws LBMException
 
void queueTopicList (String queue, LBMAsyncOperationCallback asyncOpCb, Object cbArg) throws LBMException
 
void respond (LBMSerializedResponse serializedResponse, byte[] data, int dataLength, int flags) throws LBMException
 

Protected Member Functions

void finalize ()
 
int sourceNotification (String topic, String source)
 

Detailed Description

Creates an LBM context.

This creates an instance of the LBM main processing element, an LBM context. Sources and Receivers are created from an LBM context and work within that context. For the Embedded operational mode, a thread is spawned to handle message processing.

Constructor & Destructor Documentation

com.latencybusters.lbm.LBMContext.LBMContext ( ) throws LBMException

Instantiate an LBMContext object using default attributes.

Exceptions
LBMExceptionif any error occurs creating the context.
com.latencybusters.lbm.LBMContext.LBMContext ( LBMContextAttributes  lbmcattr) throws LBMException

Instantiate an LBMContext object using given attributes.

Parameters
lbmcattrLBMContextAttributes used to initialize the context
Exceptions
LBMExceptionif any error occurs creating the context.

References com.latencybusters.lbm.LBMContext.addImmediateMessageReceiver(), and com.latencybusters.lbm.LBMContext.addSourceNotifyCallback().

Member Function Documentation

void com.latencybusters.lbm.LBMContext.addImmediateMessageReceiver ( LBMImmediateMessageCallback  cb)

Register a callback for handling of non-topic immediate messages

Parameters
cbObject implementing the LBMImmediateMessageCallback interface
See also
enableImmediateMessageReceiver
removeImmediateMessageReceiver
LBMImmediateMessageCallback

Referenced by com.latencybusters.lbm.LBMContext.LBMContext().

void com.latencybusters.lbm.LBMContext.addImmediateMessageReceiver ( LBMImmediateMessageCallback  cb,
Object  cbArg 
)

Register a callback (and callback token) for handling of non-topic immediate messages

Parameters
cbObject implementing the LBMImmediateMessageCallback interface
cbArgCallback token object
See also
enableImmediateMessageReceiver
removeImmediateMessageReceiver
LBMImmediateMessageCallback
void com.latencybusters.lbm.LBMContext.addSourceNotifyCallback ( LBMSourceNotification  cb) throws LBMException

Register a callback interface (and a callback handle argument) to be called when a new source is seen for any topic. This callback is called directly in line and does not use the event queue; therefore, the callback function used should not block or it will block the context thread processing. This facility is disabled by default and may be enabled by calling the LBMContextAttributes#enableSourceNotification method prior to instantiation of LBMContext.

Parameters
cbAn object implementing the LBMSourceNotification interface
Exceptions
LBMExceptionif any error occurs.
See also
LBMSourceNotification
LBMContextAttributes::enableSourceNotification
removeSourceNotifyCallback

Referenced by com.latencybusters.lbm.LBMContext.LBMContext().

void com.latencybusters.lbm.LBMContext.addSourceNotifyCallback ( LBMSourceNotification  cb,
Object  cbArg 
) throws LBMException

Register a callback interface (and a callback handle argument) to be called when a new source is seen for any topic. This callback is called directly in line and does not use the event queue; therefore, the callback function used should not block or it will block the context thread processing. This facility is disabled by default and may be enabled by calling the LBMContextAttributes#enableSourceNotification method prior to instantiation of LBMContext.

Parameters
cbAn object implementing the LBMSourceNotification interface
cbArgCallback object passed as a token to the callback interface
Exceptions
LBMExceptionif any error occurs.
See also
LBMSourceNotification
removeSourceNotifyCallback
LBMTopic com.latencybusters.lbm.LBMContext.allocTopic ( String  symbol) throws LBMException

Create an LBMTopic object (useable for an LBM source) for given topic name and attributes.

Warning: It is not safe to call this method from a context thread callback.

Parameters
symbolTopic name string. Topic strings should be limited in length to 246 characters (not including the final null).
Returns
LBMTopic object for specified topic name and attributes
Exceptions
LBMExceptionif any error occurs allocating up the topic.
LBMTopic com.latencybusters.lbm.LBMContext.allocTopic ( String  symbol,
LBMSourceAttributes  lbmsattr 
) throws LBMException

Create an LBMTopic object (useable for an LBM source) for given topic name and attributes.

Warning: It is not safe to call this method from a context thread callback.

Parameters
symbolTopic name string. Topic strings should be limited in length to 246 characters (not including the final null).
lbmsattrLBMSourceAttributes object
Returns
LBMTopic object for specified topic name and attributes
Exceptions
LBMExceptionif any error occurs allocating up the topic.

References com.latencybusters.lbm.LBMMessage.dataBuffer(), com.latencybusters.lbm.LBM.LOG_WARNING, and com.latencybusters.lbm.LBMImmediateMessageCallback.onReceiveImmediate().

void com.latencybusters.lbm.LBMContext.close ( )

Close this context. All sources and receivers associated with this context should be closed first.

Warning: It is not safe to close() from a context thread callback.

Referenced by com.latencybusters.lbm.LBMContext.finalize().

LBMHotFailoverReceiver com.latencybusters.lbm.LBMContext.createHotFailoverReceiver ( LBMTopic  lbmtopic) throws LBMException

Create an LBM Hot-Failover Receiver object associated with this context and a given topic.

Warning: It is not safe to call this method from a context thread callback.

Deprecated:
After LBM 4.0, use createHotFailoverReceiver(LBMTopic,LBMReceiverCallback,Object)
Parameters
lbmtopicLBMTopic used to initialize the receiver.
Returns
LBMHotFailoverReceiver object
Exceptions
LBMExceptionif any error occurs creating the hot failover receiver.
LBMHotFailoverReceiver com.latencybusters.lbm.LBMContext.createHotFailoverReceiver ( LBMTopic  lbmtopic,
LBMEventQueue  lbmevq 
) throws LBMException

Create an LBM Hot-Failover Receiver object associated with this context and a given topic and event queue.

Warning: It is not safe to call this method from a context thread callback.

Deprecated:
After LBM 4.0, use createHotFailoverReceiver(LBMTopic,LBMReceiverCallback,Object,LBMEventQueue)
Parameters
lbmtopicLBMTopic used to initialize the receiver.
lbmevqEvent queue with which to associate the receiver (all receiver events will be posted to this event queue).
Returns
LBMHotFailoverReceiver object
Exceptions
LBMExceptionif any error occurs creating the hot failover receiver.
LBMHotFailoverReceiver com.latencybusters.lbm.LBMContext.createHotFailoverReceiver ( LBMTopic  lbmtopic,
LBMReceiverCallback  cb,
Object  cbArg 
) throws LBMException

Create an LBM Hot-Failover Receiver object associated with this context and a given topic.

Warning: It is not safe to call this method from a context thread callback.

Parameters
lbmtopicLBMTopic used to initialize the receiver.
cbAn object implementing the LBMReceiverCallback interface
cbArgCallback object passed as token to callback interface
Returns
LBMHotFailoverReceiver object
Exceptions
LBMExceptionif any error occurs creating the hot failover receiver.
LBMHotFailoverReceiver com.latencybusters.lbm.LBMContext.createHotFailoverReceiver ( LBMTopic  lbmtopic,
LBMReceiverCallback  cb,
Object  cbArg,
LBMEventQueue  lbmevq 
) throws LBMException

Create an LBM Hot-Failover Receiver object associated with this context and a given topic and event queue.

Warning: It is not safe to call this method from a context thread callback.

Parameters
lbmtopicLBMTopic used to initialize the receiver.
cbAn object implementing the LBMReceiverCallback interface
cbArgCallback object passed as token to callback interface
lbmevqEvent queue with which to associate the receiver (all receiver events will be posted to this event queue).
Returns
LBMHotFailoverReceiver object
Exceptions
LBMExceptionif any error occurs creating the hot failover receiver.
LBMHotFailoverSource com.latencybusters.lbm.LBMContext.createHotFailoverSource ( LBMTopic  lbmtopic) throws LBMException

Create an LBM Hot-Failover Source object associated with this context and a given topic.

Warning: It is not safe to call this method from a context thread callback.

Parameters
lbmtopicLBMTopic used to initialize the source.
Returns
LBMHotFailoverSource object
Exceptions
LBMExceptionif any error occurs creating the hot failover source.
LBMHotFailoverSource com.latencybusters.lbm.LBMContext.createHotFailoverSource ( LBMTopic  lbmtopic,
LBMSourceEventCallback  cb,
Object  cbArg 
) throws LBMException

Create an LBM Hot-Failover Source object associated with this context and a given topic.

Warning: It is not safe to call this method from a context thread callback.

Parameters
lbmtopicLBMTopic used to initialize the source.
cbAn object implementing the LBMSourceEventCallback interface
cbArgCallback token object
Returns
LBMHotFailoverSource object
Exceptions
LBMExceptionif any error occurs creating the hot failover source.
LBMHotFailoverSource com.latencybusters.lbm.LBMContext.createHotFailoverSource ( LBMTopic  lbmtopic,
LBMEventQueue  lbmevq 
) throws LBMException

Create an LBM Hot-Failover Source object associated with this context and a given topic and event queue.

Warning: It is not safe to call this method from a context thread callback.

Parameters
lbmtopicLBMTopic used to initialize the source.
lbmevqEvent queue with which to associate the source (all source events will be posted to this event queue).
Returns
LBMHotFailoverSource object
Exceptions
LBMExceptionif any error occurs creating the hot failover source.
LBMHotFailoverSource com.latencybusters.lbm.LBMContext.createHotFailoverSource ( LBMTopic  lbmtopic,
LBMSourceEventCallback  cb,
Object  cbArg,
LBMEventQueue  lbmevq 
) throws LBMException

Create an LBM Hot-Failover Source object associated with this context and a given topic and event queue.

Warning: It is not safe to call this method from a context thread callback.

Parameters
lbmtopicLBMTopic used to initialize the source.
cbAn object implementing the LBMSourceEventCallback interface
cbArgCallback token object
lbmevqEvent queue with which to associate the source (all source events will be posted to this event queue).
Returns
LBMHotFailoverSource object
Exceptions
LBMExceptionif any error occurs creating the hot failover source.
LBMReceiver com.latencybusters.lbm.LBMContext.createReceiver ( LBMTopic  lbmtopic) throws LBMException

Create an LBM Receiver object associated with this context and a given topic.

Warning: It is not safe to call this method from a context thread callback.

Deprecated:
After LBM 4.0, use createReceiver(LBMTopic,LBMReceiverCallback,Object)
Parameters
lbmtopicLBMTopic used to initialize the receiver.
Returns
LBMReceiver object
Exceptions
LBMExceptionif any error occurs creating the receiver.
LBMReceiver com.latencybusters.lbm.LBMContext.createReceiver ( LBMTopic  lbmtopic,
LBMEventQueue  lbmevq 
) throws LBMException

Create an LBM Receiver object associated with this context and a given topic and event queue.

Warning: It is not safe to call this method from a context thread callback.

Deprecated:
After LBM 4.0, use createReceiver(LBMTopic,LBMReceiverCallback,Object,LBMEventQueue)
Parameters
lbmtopicLBMTopic used to initialize the receiver.
lbmevqEvent queue with which to associate the receiver (all receiver events will be posted to this event queue).
Returns
LBMReceiver object
Exceptions
LBMExceptionif any error occurs creating the receiver.
LBMReceiver com.latencybusters.lbm.LBMContext.createReceiver ( LBMTopic  lbmtopic,
LBMReceiverCallback  cb,
Object  cbArg 
) throws LBMException

Create an LBM Receiver object associated with this context and a given topic.

Warning: It is not safe to call this method from a context thread callback.

Parameters
lbmtopicLBMTopic used to initialize the receiver.
cbAn object implementing the LBMReceiverCallback interface
cbArgCallback object passed as token to callback interface
Returns
LBMReceiver object
Exceptions
LBMExceptionif any error occurs creating the receiver.
LBMReceiver com.latencybusters.lbm.LBMContext.createReceiver ( LBMTopic  lbmtopic,
LBMReceiverCallback  cb,
Object  cbArg,
LBMEventQueue  lbmevq 
) throws LBMException

Create an LBM Receiver object associated with this context and a given topic and event queue.

Parameters
lbmtopicLBMTopic used to initialize the receiver.
cbAn object implementing the LBMReceiverCallback interface
cbArgCallback object passed as token to callback interface
lbmevqEvent queue with which to associate the receiver (all receiver events will be posted to this event queue).
Returns
LBMReceiver object
Exceptions
LBMExceptionif any error occurs creating the receiver.
LBMSource com.latencybusters.lbm.LBMContext.createSource ( LBMTopic  lbmtopic) throws LBMException

Create an LBM Source object associated with this context and a given topic.

Warning: It is not safe to call this method from a context thread callback.

Parameters
lbmtopicLBMTopic used to initialize the source.
Returns
LBMSource object
Exceptions
LBMExceptionif any error occurs creating the source.
LBMSource com.latencybusters.lbm.LBMContext.createSource ( LBMTopic  lbmtopic,
LBMSourceEventCallback  cb,
Object  cbArg 
) throws LBMException

Create an LBM Source object associated with this context and a given topic.

Warning: It is not safe to call this method from a context thread callback.

Parameters
lbmtopicLBMTopic used to initialize the source.
cbAn object implementing the LBMSourceEventCallback interface
cbArgCallback token object
Returns
LBMSource object
Exceptions
LBMExceptionif any error occurs creating the source.
LBMSource com.latencybusters.lbm.LBMContext.createSource ( LBMTopic  lbmtopic,
LBMEventQueue  lbmevq 
) throws LBMException

Create an LBM Source object associated with this context and a given topic and event queue.

Warning: It is not safe to call this method from a context thread callback.

Parameters
lbmtopicLBMTopic used to initialize the source.
lbmevqEvent queue with which to associate the source (all source events will be posted to this event queue).
Returns
LBMSource object
Exceptions
LBMExceptionif any error occurs creating the source.
LBMSource com.latencybusters.lbm.LBMContext.createSource ( LBMTopic  lbmtopic,
LBMSourceEventCallback  cb,
Object  cbArg,
LBMEventQueue  lbmevq 
) throws LBMException

Create an LBM Source object associated with this context and a given topic and event queue.

Warning: It is not safe to call this method from a context thread callback.

Parameters
lbmtopicLBMTopic used to initialize the source.
cbAn object implementing the LBMSourceEventCallback interface
cbArgCallback token object
lbmevqEvent queue with which to associate the source (all source events will be posted to this event queue).
Returns
LBMSource object
Exceptions
LBMExceptionif any error occurs creating the source.
LBMTimer com.latencybusters.lbm.LBMContext.createTimer ( long  milliseconds) throws LBMException

Create an LBM Timer object

Parameters
millisecondsNumber of milliseconds until the timer expires
Returns
LBMTimer object
Exceptions
LBMExceptionif any error occurs creating the timer.
LBMTimer com.latencybusters.lbm.LBMContext.createTimer ( long  milliseconds,
LBMEventQueue  lbmevq 
) throws LBMException

Creates a timer associated with this context and a specified event queue that expires with a specified delay.

Parameters
millisecondsNumber of milliseconds until the timer expires
lbmevqEvent queue with with which to associate this timer (the timer events will be posted to this event queue)
Returns
LBMTimer object
Exceptions
LBMExceptionif any error occurs creating the timer.
LBMTimer com.latencybusters.lbm.LBMContext.createTimer ( long  milliseconds,
LBMTimerCallback  cb,
Object  cbArg 
) throws LBMException

Creates a timer associated with this context that expires with a specified delay.

Parameters
millisecondsNumber of milliseconds until the timer expires
cbAn object implementing the LBMTimerCallback interface
cbArgCallback object passed as token to callback interface
Returns
LBMTimer object
Exceptions
LBMExceptionif any error occurs creating the timer.
LBMTimer com.latencybusters.lbm.LBMContext.createTimer ( long  milliseconds,
LBMTimerCallback  cb,
Object  cbArg,
LBMEventQueue  lbmevq 
) throws LBMException

Creates a timer associated with this context and a specified event queue that expires with a specified delay.

Parameters
millisecondsNumber of milliseconds until the timer expires
lbmevqEvent queue with which to associate this timer
cbAn object implementing the LBMTimerCallback interface
cbArgCallback object passed as token to callback interface (the timer events will be posted to this event queue)
Returns
LBMTimer object
Exceptions
LBMExceptionif any error occurs creating the timer.
LBMConfigOption [] com.latencybusters.lbm.LBMContext.dumpAttributeList ( )

Returns an array of LBMConfigOptions.

Returns
Array of LBMConfigOption
void com.latencybusters.lbm.LBMContext.enableImmediateMessageReceiver ( ) throws LBMException

Enable LBM to receive non-topic immediate messages. This method does not establish a callback handler.

Exceptions
LBMExceptionif any error occurs enabling an immediate message receiver.
See also
addImmediateMessageReceiver
void com.latencybusters.lbm.LBMContext.enableImmediateMessageReceiver ( LBMEventQueue  lbmevq) throws LBMException

Enable LBM to receive non-topic immediate messages (using an event queue). This method does not establish a callback handler.

Parameters
lbmevqLBMEventQueue on which to process responses (may be null if not using an event queue)
Exceptions
LBMExceptionif any error occurs enabling an immediate message receiver.
See also
addImmediateMessageReceiver
void com.latencybusters.lbm.LBMContext.finalize ( )
protected

This method is for internal use only, and is not supported for customer applications.

References com.latencybusters.lbm.LBMContext.close().

String com.latencybusters.lbm.LBMContext.getAttributeValue ( String  attributeName) throws LBMException

Returns the value of a context-related attribute for this context.

Parameters
attributeNameName of the attribute to retrieve
Returns
Value corresponding to the specified attribute name
Exceptions
LBMExceptionif attributeName is not a valid attribute.
LBMImmediateMessageReceiverStatistics com.latencybusters.lbm.LBMContext.getImmediateMessageReceiverStatistics ( int  maxStats) throws LBMException

Return the immediate message receiver transport statistics for this context.

Parameters
maxStatsMaximum number of receivers.
Returns
LBMImmediateMessageReceiverStatistics object containing the statistics corresponding to this context.
Exceptions
LBMExceptionif any error occurred retrieving receiver transport statistics.

References com.latencybusters.lbm.LBMImmediateMessageReceiverStatistics.refresh(), and com.latencybusters.lbm.LBMObjectRecyclerBase.retrieveImmediateMessageReceiverStatistics().

LBMImmediateMessageSourceStatistics com.latencybusters.lbm.LBMContext.getImmediateMessageSourceStatistics ( int  maxStats) throws LBMException

Return the immediate message source transport statistics for this context.

Parameters
maxStatsMaximum number of sources.
Returns
LBMImmediateMessageSourceStatistics object containing the statistics corresponding to this context.
Exceptions
LBMExceptionif any error occurred retrieving source transport statistics.

References com.latencybusters.lbm.LBMImmediateMessageSourceStatistics.refresh(), and com.latencybusters.lbm.LBMObjectRecyclerBase.retrieveImmediateMessageSourceStatistics().

LBMReceiverStatistics com.latencybusters.lbm.LBMContext.getReceiverStatistics ( int  maxStats) throws LBMException

Return the aggregate set of receiver transport statistics for this context.

Parameters
maxStatsMaximum number of receivers.
Returns
LBMReceiverStatistics object containing the statistics corresponding to the specified number of receivers.
Exceptions
LBMExceptionif any error occurred retrieving receiver transport statistics.

References com.latencybusters.lbm.LBMReceiverStatistics.refresh(), and com.latencybusters.lbm.LBMObjectRecyclerBase.retrieveReceiverStatistics().

LBMSourceStatistics com.latencybusters.lbm.LBMContext.getSourceStatistics ( int  maxStats) throws LBMException

Return the aggregate set of source transport statistics for this context.

Parameters
maxStatsMaximum number of sources.
Returns
LBMSourceStatistics object containing the statistics corresponding to the specified number of sources.
Exceptions
LBMExceptionif any error occurred retrieving source transport statistics.

References com.latencybusters.lbm.LBMSourceStatistics.refresh(), and com.latencybusters.lbm.LBMObjectRecyclerBase.retrieveSourceStatistics().

LBMContextStatistics com.latencybusters.lbm.LBMContext.getStatistics ( ) throws LBMException

Return the current set of statistics for this context.

Returns
LBMContextStatistics object containing the statistics corresponding to this context.
Exceptions
LBMExceptionif any error occurred retrieving context statistics.

References com.latencybusters.lbm.LBMContextStatistics.refresh(), and com.latencybusters.lbm.LBMObjectRecyclerBase.retrieveContextStatistics().

int com.latencybusters.lbm.LBMContext.getUMQInflight ( String  queue) throws LBMException

Get the current UMQ inflight value for this context

Parameters
queueName of the queue
Returns
the inflight value
Exceptions
LBMExceptionif an error occurs while retrieving the inflight value

References com.latencybusters.lbm.LBMContext.setUMQInflight().

void com.latencybusters.lbm.LBMContext.load ( InputStream  inStream) throws IOException

Reads a property (attribute) list (key and element pairs) from the input stream.

Parameters
inStreamInput stream of bytes
Exceptions
IOExceptionif any I/O error occurs.
LBMRuntimeExceptionif any invalid attribute is detected in inStream.

References com.latencybusters.lbm.LBMContext.setProperty().

LBMTopic com.latencybusters.lbm.LBMContext.lookupTopic ( String  symbol) throws LBMException

Create an LBMTopic object (useable for an LBM receiver) for a given topic name.

Warning: It is not safe to call this method from a context thread callback.

Parameters
symbolTopic name string. Topic strings should be limited in length to 246 characters (not including the final null).
Returns
LBMTopic object for specified topic name
Exceptions
LBMExceptionif any error occurs looking up the topic.
LBMTopic com.latencybusters.lbm.LBMContext.lookupTopic ( String  symbol,
LBMReceiverAttributes  lbmrattr 
) throws LBMException

Create an LBMTopic object (useable for an LBM receiver) for given topic name and attributes.

Warning: It is not safe to call this method from a context thread callback.

Parameters
symbolTopic name string. Topic strings should be limited in length to 246 characters (not including the final null).
lbmrattrLBMReceiverAttributes object
Returns
LBMTopic object for specified topic name and attributes
Exceptions
LBMExceptionif any error occurs looking up the topic.
void com.latencybusters.lbm.LBMContext.processEvents ( long  msec) throws LBMException

Process internal events in the given LBM context object.

When the operational mode is set to "sequential", it is the responsibility of the application to explicitly process events for the LBM context. This method will process timers and file descriptor/socket events for internal processing as well as API timer and file descriptor/socket events.

Warning: It is not safe to call this method from a context thread callback.

Parameters
msecContinue event processing loop for at least msec milliseconds before returning.
Exceptions
LBMExceptionif any error occurs.

Referenced by com.latencybusters.lbm.LBMContextThread.terminate().

void com.latencybusters.lbm.LBMContext.processEvents ( long  msec,
int  flags 
) throws LBMException

Process internal events in the given LBM context object.

When the operational mode is set to "sequential", it is the responsibility of the application to explicitly process events for the LBM context. This method will process timers and file descriptor/socket events for internal processing as well as API timer and file descriptor/socket events.

Warning: It is not safe to call this method from a context thread callback.

Parameters
msecContinue event processing loop for at least msec milliseconds before returning.
flagsFlags to select various features. See next section for possible OR'd set of values.
Exceptions
LBMExceptionif any error occurs.
See also
LBM::PROC_EVENT_EX_FLAG_NO_MAIN_LOOP_MUTEX

References com.latencybusters.lbm.LBM.EINVAL, and com.latencybusters.lbm.LBM.PROC_EVENT_EX_FLAG_USER_TIME.

void com.latencybusters.lbm.LBMContext.processEvents ( long  msec,
int  flags,
long  tv_sec,
long  tv_usec 
) throws LBMException

Process internal events in the given LBM context object.

When the operational mode is set to "sequential", it is the responsibility of the application to explicitly process events for the LBM context. This method will process timers and file descriptor/socket events for internal processing as well as API timer and file descriptor/socket events.

Warning: It is not safe to call this method from a context thread callback.

Parameters
msecContinue event processing loop for at least msec milliseconds before returning.
flagsFlags to select various features. See next section for possible OR'd set of values.
tv_secUser supplies time when the LBM::PROC_EVENT_EX_FLAG_USER_TIME flag is set.
tv_usecUser supplies time when the LBM::PROC_EVENT_EX_FLAG_USER_TIME flag is set.
Exceptions
LBMExceptionif any error occurs.
See also
LBM::PROC_EVENT_EX_FLAG_NO_MAIN_LOOP_MUTEX
LBM::PROC_EVENT_EX_FLAG_USER_TIME
void com.latencybusters.lbm.LBMContext.queueTopicList ( String  queue,
LBMAsyncOperationCallback  asyncOpCb 
) throws LBMException

Retrieves a list of currently available topics from a queue (asynchronous operation).

Deprecated:
Parameters
queueName of the queue to retrieve topic list from.
asyncOpCbObject implementing the LBMAsyncOperationCallback interface that will receive updates and results for the asynchronous operation.
Exceptions
LBMExceptionif queue or asyncObCb parameters are invalid, or if an error occurs.
void com.latencybusters.lbm.LBMContext.queueTopicList ( String  queue,
LBMAsyncOperationCallback  asyncOpCb,
Object  cbArg 
) throws LBMException

Retrieves a list of currently available topics from a queue (asynchronous operation).

Deprecated:
Parameters
queueName of the queue to retrieve topic list from.
asyncOpCbObject implementing the LBMAsyncOperationCallback interface that will receive updates and results for the asynchronous operation.
cbArgUser-supplied callback object which will be passed back when asyncOpCb's onAsyncOperation method is called.
Exceptions
LBMExceptionif queue or asyncObCb parameters are invalid, or if an error occurs.
void com.latencybusters.lbm.LBMContext.removeImmediateMessageReceiver ( LBMImmediateMessageCallback  cb)

Deregister a non-topic, immediate message callback

Parameters
cbObject implementing the LBMImmediateMessageCallback interface
See also
enableImmediateMessageReceiver
addImmediateMessageReceiver
LBMImmediateMessageCallback
void com.latencybusters.lbm.LBMContext.removeImmediateMessageReceiver ( LBMImmediateMessageCallback  cb,
Object  cbArg 
)

Deregister a non-topic immediate message callback (and callback token)

Parameters
cbPreviously registered object implementing the LBMImmediateMessageCallback interface
cbArgCallback token for previously registered object
See also
enableImmediateMessageReceiver
addImmediateMessageReceiver
LBMImmediateMessageCallback
void com.latencybusters.lbm.LBMContext.removeSourceNotifyCallback ( LBMSourceNotification  cb)

Deregister a source notification callback

Parameters
cbPreviously registered object implementing the LBMSourceNotification interface
See also
LBMSourceNotification
addSourceNotifyCallback
void com.latencybusters.lbm.LBMContext.removeSourceNotifyCallback ( LBMSourceNotification  cb,
Object  cbArg 
)
void com.latencybusters.lbm.LBMContext.requestTopicResolution ( short  flags,
long  interval_msec,
long  duration_sec 
) throws LBMException

Request Topic Advertisements (sources), Topic Queries (receivers), and/or Wildcard Topic Queries (wildcard receivers) in the configured topic resolution address domain. Since Advertisements and Queries can become quiescent after a period defined by the Topic Resolution configuration attributes, this function will schedule Topic Resolution Requests at the given interval and duration. Contexts that receive these requests will respond with one advertisement per source and/or one query per receiver as appropriate. These requests will be ignored for topics that are not quiescent. Note that requests are only sent on the outgoing address and are only received on the incoming address. Responses to the request will similarly be sent only on the outgoing address.

Parameters
flagsFlags indicating desired requests. ORed set of values.
See also
LBM::TOPIC_RES_REQUEST_ADVERTISEMENT - Request advertisements from quiescent sources.
LBM::TOPIC_RES_REQUEST_QUERY - Request queries from quiescent receivers.
LBM::TOPIC_RES_REQUEST_WILDCARD_QUERY - Request queries from quiescent wildcard receivers.
LBM::TOPIC_RES_REQUEST_CONTEXT_ADVERTISEMENT - Request context advertisements from quiescent contexts.
LBM::TOPIC_RES_REQUEST_CONTEXT_QUERY - Request context queries from quiescent contexts.
Parameters
interval_msecInterval between requests in milliseconds. Less than 10 should be used with caution. Less than 5 is not recommended.
duration_secMinimum duration of requests in seconds. Actual duration can be longer depending on the interval. A value of zero will result in 1 request and the interval will be meaningless.

References com.latencybusters.lbm.LBM.EOS, com.latencybusters.lbm.LBM.LBM_RESOLVER_EVENT_ADVERTISEMENT_TYPE, com.latencybusters.lbm.LBMResolverEventCallback.onResolverEvent(), com.latencybusters.lbm.LBMSourceCostCallback.onSourceCost(), com.latencybusters.lbm.LBMTransportMappingCallback.onTransportMapping(), com.latencybusters.lbm.LBMResolverEvent.setAdvertisementEvent(), com.latencybusters.lbm.LBMResolverEventAdvertisement.setEventParameters(), and com.latencybusters.lbm.LBMResolverEvent.setType().

void com.latencybusters.lbm.LBMContext.resetImmediateMessageReceiverStatistics ( ) throws LBMException

Reset the immediate message receiver transport statistics for this context.

Exceptions
LBMExceptionif any error occurred resetting receiver transport statistics.
void com.latencybusters.lbm.LBMContext.resetImmediateMessageSourceStatistics ( ) throws LBMException

Reset the immediate message source transport statistics for this context.

Exceptions
LBMExceptionif any error occurred resetting source transport statistics.
void com.latencybusters.lbm.LBMContext.resetReceiverStatistics ( ) throws LBMException

Reset the transport statistics for all receivers in this context.

Exceptions
LBMExceptionif any error occurred resetting receiver transport statistics.
void com.latencybusters.lbm.LBMContext.resetSourceStatistics ( ) throws LBMException

Reset the transport statistics for all sources in this context.

Exceptions
LBMExceptionif any error occurred resetting source transport statistics.
void com.latencybusters.lbm.LBMContext.resetStatistics ( ) throws LBMException

Reset the context statistics for this instance.

Exceptions
LBMExceptionif any error occurred during resetting of statistics.
void com.latencybusters.lbm.LBMContext.respond ( LBMSerializedResponse  serializedResponse,
byte[]  data,
int  dataLength,
int  flags 
) throws LBMException

Send a response message using the serialized response that was pulled from a separate message.

Warning: It is not safe to call this method from a context thread callback.

Parameters
serializedResponseThe serialized response object that should already have been populated by calling the LBMMessage getSerializedResponse method
dataData to send in this response
dataLengthNumber of bytes of data to send in this response
flagsFlags indicating various conditions. See next section for possible OR'd set of values.
Exceptions
LBMExceptionif any error occurs sending the response.
See also
LBM::SRC_NONBLOCK
LBM::SRC_BLOCK
LBMMessage::getSerializedResponse

References com.latencybusters.lbm.LBM.EINVAL.

LBMTimer com.latencybusters.lbm.LBMContext.scheduleTimer ( long  milliseconds) throws LBMException

Creates a timer associated with this context that expires with the specified delay, and maintains a reference to it within the context.

Parameters
millisecondsNumber of milliseconds until the timer expires
Returns
LBMTimer object
Exceptions
LBMExceptionif any error occurs creating the timer.

References com.latencybusters.lbm.LBMTimer.addTimerCallback(), and com.latencybusters.lbm.LBMTimer.reschedule().

Referenced by com.latencybusters.lbm.LBMContext.scheduleTimer().

LBMTimer com.latencybusters.lbm.LBMContext.scheduleTimer ( long  milliseconds,
LBMEventQueue  lbmevq 
) throws LBMException

Creates a timer associated with this context that expires with the specified delay, associated with the specified event queue, and maintains a reference to it within the context.

Parameters
millisecondsNumber of milliseconds until the timer expires
lbmevqEvent queue with with which to associate this timer (the timer events will be posted to this event queue)
Returns
LBMTimer object
Exceptions
LBMExceptionif any error occurs creating the timer.

References com.latencybusters.lbm.LBMTimer.addTimerCallback(), and com.latencybusters.lbm.LBMTimer.reschedule().

LBMTimer com.latencybusters.lbm.LBMContext.scheduleTimer ( long  milliseconds,
LBMTimerCallback  cb,
Object  cbArg 
) throws LBMException

Creates a timer associated with this context that expires with a specified delay, and maintains a reference to it within the context.

Parameters
millisecondsNumber of milliseconds until the timer expires
cbAn object implementing the LBMTimerCallback interface
cbArgCallback object passed as token to callback interface
Returns
LBMTimer object
Exceptions
LBMExceptionif any error occurs creating the timer.

References com.latencybusters.lbm.LBMTimer.addTimerCallback(), and com.latencybusters.lbm.LBMTimer.reschedule().

LBMTimer com.latencybusters.lbm.LBMContext.scheduleTimer ( long  milliseconds,
LBMTimerCallback  cb,
Object  cbArg,
LBMEventQueue  lbmevq 
) throws LBMException

Creates a timer associated with this context and a specified event queue that expires with a specified delay, and maintains a reference to it within the context.

Parameters
millisecondsNumber of milliseconds until the timer expires
lbmevqEvent queue with which to associate this timer
cbAn object implementing the LBMTimerCallback interface
cbArgCallback object passed as token to callback interface (the timer events will be posted to this event queue)
Returns
LBMTimer object
Exceptions
LBMExceptionif any error occurs creating the timer.

References com.latencybusters.lbm.LBMTimer.addTimerCallback(), com.latencybusters.lbm.LBMTimer.reschedule(), and com.latencybusters.lbm.LBMContext.scheduleTimer().

void com.latencybusters.lbm.LBMContext.send ( String  target,
String  topic,
byte []  data,
int  dataLength,
int  flags 
) throws LBMException

Send a unicast immediate message to the target and topic.

The target is a string of one of the following forms:

  • "TCP:domain:ip:port" - where domain is the ID of the destination topic resolution domain, ip is the IP address of the destination host, and port is the request port for the context of the destination application.
  • "TCP:ip:port" - where ip is the IP address of the destination host and port is the request port for the context of the destination application. This usage assumes the destination is in the same topic resolution domain as the sender.
  • "SOURCE:source-string" - where source-string is the string associated with a source's transport session. This allows a subscriber to send a unicast immediate message directly to a publishing application. See Sending to Sources for details.

Note that immediate messages are processed somewhat less efficiently than source-based messages.

Note
If called from a context thread callback, use the LBM_SRC_NONBLOCK flag and handle any LBM_EWOULDBLOCK errors internally.
Warning
Do not call this function from a context thread callback for persistence stability or persistence confirmation events. It can result in deadlock.
Parameters
targetDestination address string.
topicTopic name to send message to or null for non-topic
dataData to send in this message
dataLengthLength (in bytes) of the data to send in this message
flagsFlags indicating various conditions. See next section for possible OR'd set of values.
Exceptions
LBMExceptionif any error occurs sending the immediate message.
See also
LBM::SRC_NONBLOCK
LBM::SRC_BLOCK
LBMRequest com.latencybusters.lbm.LBMContext.send ( String  target,
String  topic,
byte []  data,
int  dataLength,
LBMResponseCallback  cb,
Object  cbArg,
LBMEventQueue  lbmevq,
int  flags 
) throws LBMException

Send a unicast immediate request message to the target and topic.

The target is a string of one of the following forms:

  • "TCP:domain:ip:port" - where domain is the ID of the destination topic resolution domain, ip is the IP address of the destination host, and port is the request port for the context of the destination application.
  • "TCP:ip:port" - where ip is the IP address of the destination host and port is the request port for the context of the destination application. This usage assumes the destination is in the same topic resolution domain as the sender.
  • "SOURCE:source-string" - where source-string is the string associated with a source's transport session. This allows a subscriber to send a unicast immediate message directly to a publishing application. See Sending to Sources for details.

Note that immediate messages are processed somewhat less efficiently than source-based messages.

Note
If called from a context thread callback, use the LBM_SRC_NONBLOCK flag and handle any LBM_EWOULDBLOCK errors internally.
Warning
Do not call this function from a context thread callback for persistence stability or persistence confirmation events. It can result in deadlock.
Parameters
targetDestination address string.
topicTopic name to send message to or null for non-topic
dataData to send in this request
dataLengthLength (in bytes) of the data to send in this request
cbLBMResponseCallback interface to handle response callback
cbArgCallback token object
lbmevqLBMEventQueue on which to process responses (may be null if not using an event queue)
flagsFlags indicating various conditions. See next section for possible OR'd set of values.
Exceptions
LBMExceptionif any error occurs sending the immediate request.
See also
LBM::SRC_NONBLOCK
LBM::SRC_BLOCK
Returns
an LBMRequest object.

References com.latencybusters.lbm.LBMRequest.addResponseCallback().

LBMRequest com.latencybusters.lbm.LBMContext.send ( String  target,
String  topic,
byte []  data,
int  dataLength,
LBMResponseCallback  cb,
Object  cbArg,
int  flags 
) throws LBMException

Send a unicast immediate request message to the target and topic.

The target is a string of one of the following forms:

  • "TCP:domain:ip:port" - where domain is the ID of the destination topic resolution domain, ip is the IP address of the destination host, and port is the request port for the context of the destination application.
  • "TCP:ip:port" - where ip is the IP address of the destination host and port is the request port for the context of the destination application. This usage assumes the destination is in the same topic resolution domain as the sender.
  • "SOURCE:source-string" - where source-string is the string associated with a source's transport session. This allows a subscriber to send a unicast immediate message directly to a publishing application. See Sending to Sources for details.

Note that immediate messages are processed somewhat less efficiently than source-based messages.

Note
If called from a context thread callback, use the LBM_SRC_NONBLOCK flag and handle any LBM_EWOULDBLOCK errors internally.
Warning
Do not call this function from a context thread callback for persistence stability or persistence confirmation events. It can result in deadlock.
Parameters
targetDestination address string.
topicTopic name to send message to or null for non-topic
dataData to send in this request
dataLengthLength (in bytes) of the data to send in this request
cbLBMResponseCallback interface to handle response callback
cbArgCallback token object
flagsFlags indicating various conditions. See next section for possible OR'd set of values.
Exceptions
LBMExceptionif any error occurs sending the immediate request.
See also
LBM::SRC_NONBLOCK
LBM::SRC_BLOCK
Returns
an LBMRequest object.

References com.latencybusters.lbm.LBMRequest.addResponseCallback().

void com.latencybusters.lbm.LBMContext.send ( String  target,
String  topic,
LBMRequest  lbmreq,
LBMEventQueue  lbmevq,
int  flags 
) throws LBMException

Send a unicast immediate request message to the target and topic.

The target is a string of one of the following forms:

  • "TCP:domain:ip:port" - where domain is the ID of the destination topic resolution domain, ip is the IP address of the destination host, and port is the request port for the context of the destination application.
  • "TCP:ip:port" - where ip is the IP address of the destination host and port is the request port for the context of the destination application. This usage assumes the destination is in the same topic resolution domain as the sender.
  • "SOURCE:source-string" - where source-string is the string associated with a source's transport session. This allows a subscriber to send a unicast immediate message directly to a publishing application. See Sending to Sources for details.

Note that immediate messages are processed somewhat less efficiently than source-based messages.

Note
If called from a context thread callback, use the LBM_SRC_NONBLOCK flag and handle any LBM_EWOULDBLOCK errors internally.
Warning
Do not call this function from a context thread callback for persistence stability or persistence confirmation events. It can result in deadlock.
Parameters
targetDestination address string.
topicTopic name to send message to or null for non-topic
lbmreqLBMRequest object
lbmevqLBMEventQueue on which to process responses (may be null if not using an event queue)
flagsFlags indicating various conditions. See next section for possible OR'd set of values.
Exceptions
LBMExceptionif any error occurs sending the immediate request.
See also
LBM::SRC_NONBLOCK
LBM::SRC_BLOCK

References com.latencybusters.lbm.LBMRequest.data(), and com.latencybusters.lbm.LBMRequest.dataLength().

void com.latencybusters.lbm.LBMContext.send ( String  target,
String  topic,
LBMRequest  lbmreq,
int  flags 
) throws LBMException

Send a unicast immediate request message to the target and topic.

The target is a string of one of the following forms:

  • "TCP:domain:ip:port" - where domain is the ID of the destination topic resolution domain, ip is the IP address of the destination host, and port is the request port for the context of the destination application.
  • "TCP:ip:port" - where ip is the IP address of the destination host and port is the request port for the context of the destination application. This usage assumes the destination is in the same topic resolution domain as the sender.
  • "SOURCE:source-string" - where source-string is the string associated with a source's transport session. This allows a subscriber to send a unicast immediate message directly to a publishing application. See Sending to Sources for details.

Note that immediate messages are processed somewhat less efficiently than source-based messages.

Note
If called from a context thread callback, use the LBM_SRC_NONBLOCK flag and handle any LBM_EWOULDBLOCK errors internally.
Warning
Do not call this function from a context thread callback for persistence stability or persistence confirmation events. It can result in deadlock.
Parameters
targetDestination address string.
topicTopic name to send message to or null for non-topic
lbmreqLBMRequest object
flagsFlags indicating various conditions. See next section for possible OR'd set of values.
Exceptions
LBMExceptionif any error occurs sending the immediate request.
See also
LBM::SRC_NONBLOCK
LBM::SRC_BLOCK

References com.latencybusters.lbm.LBMRequest.data(), and com.latencybusters.lbm.LBMRequest.dataLength().

void com.latencybusters.lbm.LBMContext.send ( String  topic,
byte []  data,
int  dataLength,
int  flags 
) throws LBMException

Send a multicast immediate message to a specific topic.

Note
If called from a context thread callback, use the LBM_SRC_NONBLOCK flag and handle any LBM_EWOULDBLOCK errors internally.
Warning
Do not call this function from a context thread callback for persistence stability or persistence confirmation events. It can result in deadlock.
Parameters
topicTopic name to send message to or null for non-topic
dataData to send in this message
dataLengthLength (in bytes) of the data to send in this message
flagsFlags indicating various conditions. See next section for possible OR'd set of values.
Exceptions
LBMExceptionif any error occurs sending the immediate message.
See also
LBM::SRC_NONBLOCK
LBM::SRC_BLOCK
LBM::MSG_FLUSH
LBMRequest com.latencybusters.lbm.LBMContext.send ( String  topic,
byte []  data,
int  dataLength,
LBMResponseCallback  cb,
Object  cbArg,
LBMEventQueue  lbmevq,
int  flags 
) throws LBMException

Send a multicast immediate request to a specific topic (specifying an Event Queue for processing of the response(s))

Note
If called from a context thread callback, use the LBM_SRC_NONBLOCK flag and handle any LBM_EWOULDBLOCK errors internally.
Warning
Do not call this function from a context thread callback for persistence stability or persistence confirmation events. It can result in deadlock.
Parameters
topicTopic name to send message to or null for non-topic
dataData to send in this request
dataLengthLength (in bytes) of the data to send in this request
cbLBMResponseCallback interface to handle response callback
cbArgCallback token object
lbmevqLBMEventQueue on which to process responses (may be null if not using an event queue)
flagsFlags indicating various conditions. See next section for possible OR'd set of values.
Exceptions
LBMExceptionif any error occurs sending the immediate request.
See also
LBM::SRC_NONBLOCK
LBM::SRC_BLOCK
LBM::MSG_FLUSH
Returns
an LBMRequest object.

References com.latencybusters.lbm.LBMRequest.addResponseCallback().

LBMRequest com.latencybusters.lbm.LBMContext.send ( String  topic,
byte []  data,
int  dataLength,
LBMResponseCallback  cb,
Object  cbArg,
int  flags 
) throws LBMException

Send a multicast immediate request to a specific topic

Note
If called from a context thread callback, use the LBM_SRC_NONBLOCK flag and handle any LBM_EWOULDBLOCK errors internally.
Warning
Do not call this function from a context thread callback for persistence stability or persistence confirmation events. It can result in deadlock.
Parameters
topicTopic name to send message to or null for non-topic
dataData to send in this request
dataLengthLength (in bytes) of the data to send in this request
cbLBMResponseCallback interface to handle response callback
cbArgCallback token object
flagsFlags indicating various conditions. See next section for possible OR'd set of values.
Exceptions
LBMExceptionif any error occurs sending the immediate request.
See also
LBM::SRC_NONBLOCK
LBM::SRC_BLOCK
LBM::MSG_FLUSH
Returns
an LBMRequest object.

References com.latencybusters.lbm.LBMRequest.addResponseCallback().

void com.latencybusters.lbm.LBMContext.send ( String  topic,
LBMRequest  lbmreq,
LBMEventQueue  lbmevq,
int  flags 
) throws LBMException

Send a multicast immediate request to a specific topic (specifying an Event Queue for processing of the response(s)).

Note
If called from a context thread callback, use the LBM_SRC_NONBLOCK flag and handle any LBM_EWOULDBLOCK errors internally.
Warning
Do not call this function from a context thread callback for persistence stability or persistence confirmation events. It can result in deadlock.
Parameters
topicTopic name to send message to or null for non-topic
lbmreqLBMRequest object
lbmevqLBMEventQueue on which to process responses (may be null if not using an event queue)
flagsFlags indicating various conditions. See next section for possible OR'd set of values.
Exceptions
LBMExceptionif any error occurs sending the immediate request.
See also
LBM::SRC_NONBLOCK
LBM::SRC_BLOCK
LBM::MSG_FLUSH

References com.latencybusters.lbm.LBMRequest.data(), and com.latencybusters.lbm.LBMRequest.dataLength().

void com.latencybusters.lbm.LBMContext.send ( String  topic,
LBMRequest  lbmreq,
int  flags 
) throws LBMException

Send a multicast immediate request to a specific topic.

Note
If called from a context thread callback, use the LBM_SRC_NONBLOCK flag and handle any LBM_EWOULDBLOCK errors internally.
Warning
Do not call this function from a context thread callback for persistence stability or persistence confirmation events. It can result in deadlock.
Parameters
topicTopic name to send message to or null for non-topic
lbmreqLBMRequest object
flagsFlags indicating various conditions. See next section for possible OR'd set of values.
Exceptions
LBMExceptionif any error occurs sending the immediate request.
See also
LBM::SRC_NONBLOCK
LBM::SRC_BLOCK
LBM::MSG_FLUSH

References com.latencybusters.lbm.LBMRequest.data(), and com.latencybusters.lbm.LBMRequest.dataLength().

void com.latencybusters.lbm.LBMContext.send ( String  queue,
String  topic,
byte[]  data,
int  datalength,
int  flags,
LBMSourceSendExInfo  exinfo 
) throws LBMException

Send an immediate message on a specific topic to a queue (UMQ only).

Note
If called from a context thread callback, use the LBM_SRC_NONBLOCK flag and handle any LBM_EWOULDBLOCK errors internally.
Warning
Do not call this function from a context thread callback for persistence stability or persistence confirmation events. It can result in deadlock.
Parameters
queueQueue to submit message to
topicTopic name to send message to or null for non-topic
dataData to send in this message.
datalengthLength (in bytes) of the data to send in this message.
flagsFlags indicating various conditions. See next section for possible OR'd set of values.
exinfoLBMSourceSendExInfo object; used to set callback behavior flags and pass back a user-supplied object.
Exceptions
LBMExceptionif any error occurs sending the immediate request.
See also
LBM::SRC_NONBLOCK
LBM::SRC_BLOCK
LBM::MSG_FLUSH
LBMSourceSendExInfo
Since
UME 3.0
void com.latencybusters.lbm.LBMContext.sendc ( char []  target,
char []  topic,
byte []  data,
int  dataLength,
int  flags 
) throws LBMException

Send a unicast immediate message to the target and topic.

The target is a string of one of the following forms:

  • "TCP:domain:ip:port" - where domain is the ID of the destination topic resolution domain, ip is the IP address of the destination host, and port is the request port for the context of the destination application.
  • "TCP:ip:port" - where ip is the IP address of the destination host and port is the request port for the context of the destination application. This usage assumes the destination is in the same topic resolution domain as the sender.
  • "SOURCE:source-string" - where source-string is the string associated with a source's transport session. This allows a subscriber to send a unicast immediate message directly to a publishing application. See Sending to Sources for details.

Note that immediate messages are processed somewhat less efficiently than source-based messages.

Note
If called from a context thread callback, use the LBM_SRC_NONBLOCK flag and handle any LBM_EWOULDBLOCK errors internally.
Warning
Do not call this function from a context thread callback for persistence stability or persistence confirmation events. It can result in deadlock.
Parameters
targetDestination address string.
topicTopic name to send message to or null for non-topic
dataData to send in this message
dataLengthLength (in bytes) of the data to send in this message
flagsFlags indicating various conditions. See next section for possible OR'd set of values.
Exceptions
LBMExceptionif any error occurs sending the immediate message.
See also
LBM::SRC_NONBLOCK
LBM::SRC_BLOCK
void com.latencybusters.lbm.LBMContext.sendc ( char []  topic,
byte []  data,
int  dataLength,
int  flags 
) throws LBMException

Send a multicast immediate message to a specific topic.

Note
If called from a context thread callback, use the LBM_SRC_NONBLOCK flag and handle any LBM_EWOULDBLOCK errors internally.
Warning
Do not call this function from a context thread callback for persistence stability or persistence confirmation events. It can result in deadlock.
Parameters
topicTopic name to send message to or null for non-topic
dataData to send in this message
dataLengthLength (in bytes) of the data to send in this message
flagsFlags indicating various conditions. See next section for possible OR'd set of values.
Exceptions
LBMExceptionif any error occurs sending the immediate message.
See also
LBM::SRC_NONBLOCK
LBM::SRC_BLOCK
LBM::MSG_FLUSH
void com.latencybusters.lbm.LBMContext.sendTopicless ( String  target,
byte []  data,
int  dataLength,
int  flags 
) throws LBMException

Send a topicless unicast immediate message to the target.

The target is a string of one of the following forms:

  • "TCP:domain:ip:port" - where domain is the ID of the destination topic resolution domain, ip is the IP address of the destination host, and port is the request port for the context of the destination application.
  • "TCP:ip:port" - where ip is the IP address of the destination host and port is the request port for the context of the destination application. This usage assumes the destination is in the same topic resolution domain as the sender.
  • "SOURCE:source-string" - where source-string is the string associated with a source's transport session. This allows a subscriber to send a unicast immediate message directly to a publishing application. See Sending to Sources for details.

Note that immediate messages are processed somewhat less efficiently than source-based messages.

Note
If called from a context thread callback, use the LBM_SRC_NONBLOCK flag and handle any LBM_EWOULDBLOCK errors internally.
Warning
Do not call this function from a context thread callback for persistence stability or persistence confirmation events. It can result in deadlock.
Parameters
targetDestination address string.
dataData to send in this message
dataLengthLength (in bytes) of the data to send in this message
flagsFlags indicating various conditions. See next section for possible OR'd set of values.
Exceptions
LBMExceptionif any error occurs sending the immediate message.
See also
LBM::SRC_NONBLOCK
LBM::SRC_BLOCK
void com.latencybusters.lbm.LBMContext.sendTopicless ( char []  target,
byte []  data,
int  dataLength,
int  flags 
) throws LBMException

Send a topicless unicast immediate message to the target.

The target is a string of one of the following forms:

  • "TCP:domain:ip:port" - where domain is the ID of the destination topic resolution domain, ip is the IP address of the destination host, and port is the request port for the context of the destination application.
  • "TCP:ip:port" - where ip is the IP address of the destination host and port is the request port for the context of the destination application. This usage assumes the destination is in the same topic resolution domain as the sender.
  • "SOURCE:source-string" - where source-string is the string associated with a source's transport session. This allows a subscriber to send a unicast immediate message directly to a publishing application. See Sending to Sources for details.

Note that immediate messages are processed somewhat less efficiently than source-based messages.

Note
If called from a context thread callback, use the LBM_SRC_NONBLOCK flag and handle any LBM_EWOULDBLOCK errors internally.
Warning
Do not call this function from a context thread callback for persistence stability or persistence confirmation events. It can result in deadlock.
Parameters
targetDestination address string.
dataData to send in this message
dataLengthLength (in bytes) of the data to send in this message
flagsFlags indicating various conditions. See next section for possible OR'd set of values.
Exceptions
LBMExceptionif any error occurs sending the immediate message.
See also
LBM::SRC_NONBLOCK
LBM::SRC_BLOCK
void com.latencybusters.lbm.LBMContext.sendTopicless ( byte []  data,
int  dataLength,
int  flags 
) throws LBMException

Send a topicless multicast immediate message.

Note
If called from a context thread callback, use the LBM_SRC_NONBLOCK flag and handle any LBM_EWOULDBLOCK errors internally.
Warning
Do not call this function from a context thread callback for persistence stability or persistence confirmation events. It can result in deadlock.
Parameters
dataData to send in this message
dataLengthLength (in bytes) of the data to send in this message
flagsFlags indicating various conditions. See next section for possible OR'd set of values.
Exceptions
LBMExceptionif any error occurs sending the immediate message.
See also
LBM::SRC_NONBLOCK
LBM::SRC_BLOCK
LBM::MSG_FLUSH
int com.latencybusters.lbm.LBMContext.serializeLbmmonControlMessage ( ByteBuffer  message,
int  command,
String  data,
int  nodeType,
String  applicationID 
) throws LBMException

Serialize the LBMMON control message

Parameters
messageDirect Byte Buffer to hold serialized message
commandLBMMON control command
dataLBMMON control data
nodeTypeLBMMON node type for control message
applicationIDLBMMON Application ID for control message
Returns
int Size of serialized message
Exceptions
LBMExceptionif any error occurs serializing the message.
void com.latencybusters.lbm.LBMContext.setAttributeValue ( String  attributeName,
String  attributeValue 
) throws LBMException

Set the value of a context-related attribute for this context. Note that this method bypasses the property list. As such no attributes configured using this method will appear in the property list.

Parameters
attributeNameName of the attribute to set
attributeValueNew attribute value
Exceptions
LBMExceptionif attributeName is not a valid attribute, or attributeValue is not a valid value for attributeName.
See also
setProperty

Referenced by com.latencybusters.lbm.LBMContext.setProperty().

void com.latencybusters.lbm.LBMContext.setAuthCredentials ( LBMAuthUserInfo  userInfo,
LBMAuthCredentialsCallback  authCallback,
Object  cbArg 
) throws LBMException

Sets the initial authentication credentials for this context as well as a callback to call if for new credentials if authentication fails.

Parameters
userInfoInitial user credentials.
authCallbackCallback that will be called to obtain different user credentials if authentication fails. Can be null, in which case the same credentials as originally given will be tried each time.
cbArgUser-supplied callback object.
Exceptions
LBMExceptionif setting credentials or the callback fails.

References com.latencybusters.lbm.LBMAuthCredentialsCallback.onAuthRequest().

Object com.latencybusters.lbm.LBMContext.setProperty ( String  attributeName,
String  attributeValue 
)

Set the current value of an attribute in this set of context attributes.

Parameters
attributeNameName of the attribute to set
attributeValueNew attribute value
Exceptions
LBMRuntimeExceptionif attributeName is not a valid attribute, or attributeValue is not a valid value for attributeName.
Returns
an Object.

References com.latencybusters.lbm.LBMContext.setAttributeValue().

Referenced by com.latencybusters.lbm.LBMContext.load().

int com.latencybusters.lbm.LBMContext.setUMQInflight ( String  queue,
LBMSetInflightCallback  setInflightCb,
Object  clientd 
) throws LBMException

Set the current UMQ inflight value for this context.

Deprecated:
Parameters
queueName of the queue
setInflightCbObject that implements the LBMSetInflightCallback interface
clientdClientd object passed into the setInflight callback
Returns
the new inflight value
Exceptions
LBMExceptionif an error occurs while setting the inflight value

Referenced by com.latencybusters.lbm.LBMContext.getUMQInflight().

void com.latencybusters.lbm.LBMContext.setUMQMessageStable ( String  queue,
UMQMessageId  msg_id 
) throws LBMException

Mark a specific msg_id as stable, triggering an event if configured to do so, and adjusting the inflight if necessary.

Deprecated:
Parameters
queueName of the queue
msg_idMessageId of the message to mark stable
Exceptions
LBMExceptionif an error occurs while marking the message stable
int com.latencybusters.lbm.LBMContext.sourceNotification ( String  topic,
String  source 
)
protected

Default source notification callback. This method is called when a new source is seen for any topic (when enabled). This callback is called directly in line and does not use an event queue; therefore, it should not block which would impact processing on the context processing thread.

Parameters
topicNew topic string
sourceString identifying the source for the new topic
See also
LBMContextAttributes::enableSourceNotification
addSourceNotifyCallback
removeSourceNotifyCallback
Returns
an int which is always 0.

References com.latencybusters.lbm.LBMSourceNotification.sourceNotification().

void com.latencybusters.lbm.LBMContext.unblockProcessEvents ( ) throws LBMException

Unblock processEvents call.

When the operational mode is set to "sequential", this API forces a call to processEvents to return immediately after completing the current set of I/O operations instead of waiting.

Exceptions
LBMExceptionif any error occurs.

Referenced by com.latencybusters.lbm.LBMContextThread.terminate().


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