UM Java API 6.17.1

- Main Page
- Related Pages
- Classes

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | List of all members
com.latencybusters.lbm.LBMReceiver Class Reference
Inheritance diagram for com.latencybusters.lbm.LBMReceiver:

## Public Member Functions
| LBMReceiver (LBMContext lbmctx, LBMTopic lbmtopic, LBMReceiverCallback cb, Object cbArg) throws LBMException
| LBMReceiver (LBMContext lbmctx, LBMTopic lbmtopic, LBMReceiverCallback cb, Object cbArg, LBMEventQueue lbmevq) throws LBMException
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
LBMReceiverStatistics | getStatistics (String source) throws LBMException
void | resetStatistics (String source) throws LBMException
LBMReceiverStatistics | getStatistics (int maxStats) throws LBMException
void | resetStatistics () throws LBMException
void | subscribeChannel (long channelNumber, LBMReceiverCallback cb, Object cbArg) throws LBMException
void | unsubscribeChannel (long channelNumber) throws LBMException
final void | close () throws LBMException
int | receiverCount ()
void | addReceiver (LBMReceiverCallback cb)
void | addReceiver (LBMReceiverCallback cb, Object cbArg)
void | removeReceiver (LBMReceiverCallback cb)
void | removeReceiver (LBMReceiverCallback cb, Object cbArg)
void | setSourceClientObject (String source, Object newClientObject) throws LBMEInvalException
void | umederegister () throws LBMException
void | umewrcvderegister () throws LBMException
void | deregister () throws LBMException
void | deregister (String queue) throws LBMException
void | indexStopAssignment (String queue) throws LBMException
void | indexStartAssignment (String queue) throws LBMException
void | indexRelease (String queue, UMQIndexInfo index) throws LBMException
List< LBMMessage > | browseQueueMessages (String queue, int max, long timeoutMS) throws LBMException
void | queueMessageList (String queue, LBMAsyncOperationCallback asyncOpCb) throws LBMException
void | queueMessageList (String queue, LBMAsyncOperationCallback asyncOpCb, Object cbArg) throws LBMException
void | queueMessageList (String queue, LBMAsyncOperationCallback asyncOpCb, Object cbArg, String msgSelector) throws LBMException
void | queueMessageRetrieve (String queue, List< UMQMessageId > messageIDs, LBMAsyncOperationCallback asyncOpCb) throws LBMException
void | queueMessageRetrieve (String queue, List< UMQMessageId > messageIDs, LBMAsyncOperationCallback asyncOpCb, Object cbArg) throws LBMException

## Protected Member Functions
| LBMReceiver (LBMContext lbmctx, LBMTopic lbmtopic) throws LBMException
| LBMReceiver (LBMContext lbmctx, LBMTopic lbmtopic, LBMEventQueue lbmevq) throws LBMException
void | finalize () throws LBMException
int | onReceive (LBMMessage lbmmsg)
int | onChannelReceive (LBMMessage lbmmsg, LBMReceiverCallback cb, Object cbArg)

## Detailed Description

LBM Receiver class. This class can be subclassed in order to override the default onReceive() method used to deliver received data or an LBMReceiverCallback interface may be specified for handling the received message callback.

Warning: It is not safe to instantiate this class from a context thread callback.

## Constructor & Destructor Documentation

com.latencybusters.lbm.LBMReceiver.LBMReceiver | ( | LBMContext | lbmctx,
|  | LBMTopic | lbmtopic
| ) |  | throws LBMException
| protected

Instantiate an LBM Receiver object associated with a given context and topic. ATTENTION: An application must have at least one receiver callback registered per receiver object. Use of this constructor in a class that does not override the onReceive method creates a window after receiver creation and before adding a callback in which messages may be lost. Using this constructor in a class that overrides the onReceive method yields the best performance, and is recommended. If multiple callbacks support is needed, or if overriding the onReceive method is not desirable, use a constructor that specifies at least one initial callback.

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

Parameters

  lbmctx | Context with which to associate the receiver.
  lbmtopic | LBMTopic used to initialize the receiver.

Exceptions

  LBMException | if an error occurs creating the receiver.

com.latencybusters.lbm.LBMReceiver.LBMReceiver | ( | LBMContext | lbmctx,
|  | LBMTopic | lbmtopic,
|  | LBMEventQueue | lbmevq
| ) |  | throws LBMException
| protected

Instantiate an LBM Receiver object associated with a given context, topic, and event queue. ATTENTION: An application must have at least one receiver callback registered per receiver object. Use of this constructor in a class that does not override the onReceive method creates a window after receiver creation and before adding a callback in which messages may be lost. Using this constructor in a class that overrides the onReceive method yields the best performance, and is recommended. If multiple callbacks support is needed, or if overriding the onReceive method is not desirable, use a constructor that specifies at least one initial callback.

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

Parameters

  lbmctx | Context with which to associate the receiver.
  lbmtopic | LBMTopic used to initialize the receiver.
  lbmevq | Event queue with which to associate the receiver (all receiver events will be posted to this event queue).

Exceptions

  LBMException | if an error occurs creating the receiver.

com.latencybusters.lbm.LBMReceiver.LBMReceiver | ( | LBMContext | lbmctx,
|  | LBMTopic | lbmtopic,
|  | LBMReceiverCallback | cb,
|  | Object | cbArg
| ) |  | throws LBMException

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

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

Parameters

  lbmctx | Context with which to associate the receiver.
  lbmtopic | LBMTopic used to initialize the receiver.
  cb | An object implementing the LBMReceiverCallback interface
  cbArg | Callback object passed as token to callback interface

Exceptions

  LBMException | if an error occurs creating the receiver.

com.latencybusters.lbm.LBMReceiver.LBMReceiver | ( | LBMContext | lbmctx,
|  | LBMTopic | lbmtopic,
|  | LBMReceiverCallback | cb,
|  | Object | cbArg,
|  | LBMEventQueue | lbmevq
| ) |  | throws LBMException

Instantiate an LBM Receiver object associated with a given context, topic, and event queue.

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

Parameters

  lbmctx | Context with which to associate the receiver.
  lbmtopic | LBMTopic used to initialize the receiver.
  cb | An object implementing the LBMReceiverCallback interface
  cbArg | Callback object passed as token to callback interface
  lbmevq | Event queue with which to associate the receiver (all receiver events will be posted to this event queue).

Exceptions

  LBMException | if an error occurs creating the receiver.

References com.latencybusters.lbm.LBM.EINVAL.

## Member Function Documentation

void com.latencybusters.lbm.LBMReceiverBase.addReceiver | ( | LBMReceiverCallback | cb | ) |
| inherited

Register a receiver callback

Parameters

  cb | Object implementing the LBMReceiverCallback interface

See also
  LBMReceiverCallback
  LBMReceiverBase::removeReceiver(LBMReceiverCallback)

void com.latencybusters.lbm.LBMReceiverBase.addReceiver | ( | LBMReceiverCallback | cb,
|  | Object | cbArg
| ) |  |
| inherited

Register a receiver callback (and callback token)

Parameters

  cb | Object implementing the LBMReceiverCallback interface
  cbArg | Callback token object

See also
  LBMReceiverCallback
  LBMReceiverBase::removeReceiver(LBMReceiverCallback)

List<LBMMessage> com.latencybusters.lbm.LBMReceiverBase.browseQueueMessages | ( | String | queue,
|  | int | max,
|  | long | timeoutMS
| ) |  | throws LBMException
| inherited

Not currently supported. When implemented, it will browse messages on the given UMQ queue.

Parameters

  queue | Name of the queue at which to browse.
  max | The max number of messages to return
  timeoutMS | Timeout

Exceptions

  LBMException | if any error occurs.

final void com.latencybusters.lbm.LBMReceiverBase.close | ( |  | ) | throws LBMException
| inherited

Close this receiver.

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

void com.latencybusters.lbm.LBMReceiverBase.deregister | ( |  | ) | throws LBMException
| inherited

Deregister from all UMQ queues.

Exceptions

  LBMEOPException | if an error occurs while attempting to deregister.

void com.latencybusters.lbm.LBMReceiverBase.deregister | ( | String | queue | ) | throws LBMException
| inherited

Deregister from a queue.

Parameters

  queue | The name of the queue to deregister from.

Exceptions

  LBMEOPException | if an error occurs while attempting to deregister.

LBMConfigOption [] com.latencybusters.lbm.LBMReceiver.dumpAttributeList | ( |  | ) |

Returns an array of LBMConfigOptions

Returns
  Array of LBMConfigOption

void com.latencybusters.lbm.LBMReceiver.finalize | ( |  | ) | throws LBMException
| protected

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

String com.latencybusters.lbm.LBMReceiver.getAttributeValue | ( | String | attributeName | ) | throws LBMException

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

Parameters

  attributeName | Name of the attribute to retrieve

Returns
  Value corresponding to the specified attribute name

Exceptions

  LBMException | if `attributeName` is not a valid attribute.

LBMReceiverStatistics com.latencybusters.lbm.LBMReceiver.getStatistics | ( | String | source | ) | throws LBMException

Return the current set of receiver transport statistics for a particular source.

Parameters

  source | Source string (as returned by LBMMesage source()) that specifies the set of statistics to return.

Returns
  LBMReceiverStatistics object containing the statistics corresponding to the specified source.

Exceptions

  LBMException | if any error occurred retrieving receiver statistics.

References com.latencybusters.lbm.LBMReceiverStatistics.refresh().

LBMReceiverStatistics com.latencybusters.lbm.LBMReceiver.getStatistics | ( | int | maxStats | ) | throws LBMException

Return the current set of receiver transport statistics for all sources.

Parameters

  maxStats | Maximum number of sources

Returns
  LBMReceiverStatistics object containing the statistics corresponding to the specified number of sources

Exceptions

  LBMException | if any error occurred retrieving receiver statistics.

References com.latencybusters.lbm.LBMReceiverStatistics.refresh().

void com.latencybusters.lbm.LBMReceiverBase.indexRelease | ( | String | queue,
|  | UMQIndexInfo | index
| ) |  | throws LBMException
| inherited

Instruct the given UMQ queue(s) to release the given UMQ index that is assigned to the given receiver.

Parameters

  queue | Name of the queue at which to release the index, or null for all queues.
  index | The index to release, or null for all indices.

Exceptions

  LBMException | if any error occurs.

Since
  UMQ 1.2

void com.latencybusters.lbm.LBMReceiverBase.indexStartAssignment | ( | String | queue | ) | throws LBMException
| inherited

Starts this receiver's eligibility for new index assignments from a queue.

Parameters

  queue | The name of the queue to start new index assignment from, or null for all queues.

Exceptions

  LBMException | if an error occurs while attempting to start index assignment.

Since
  UMQ 1.2

void com.latencybusters.lbm.LBMReceiverBase.indexStopAssignment | ( | String | queue | ) | throws LBMException
| inherited

Stops this receiver's eligibility for new index assignments from a queue.

Parameters

  queue | The name of the queue to stop new index assignment from, or null for all queues.

Exceptions

  LBMException | if an error occurs while attempting to stop index assignment.

Since
  UMQ 1.2

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

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

Parameters

  inStream | Input stream of bytes

Exceptions

  IOException | if any I/O error occurs.
  LBMRuntimeException | if any invalid attribute is detected in `inStream`.

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

int com.latencybusters.lbm.LBMReceiverBase.onReceive | ( | LBMMessage | lbmmsg | ) |
| protected inherited

Default received message callback. This method may be overridden by subclassing the LBMReceiverBase class (or one of the classes derived from LBMReceiverBase). Alternatively, a callback may be registered (deregistered) using the addReceiver() (removeReceiver()) methods.

Parameters

  lbmmsg | LBMMessage object containing the received data

See also
  LBMReceiverBase::addReceiver(LBMReceiverCallback)
  LBMReceiverBase::removeReceiver(LBMReceiverCallback)

void com.latencybusters.lbm.LBMReceiverBase.queueMessageList | ( | String | queue,
|  | LBMAsyncOperationCallback | asyncOpCb
| ) |  | throws LBMException
| inherited

Returns a list of currently-enqueued messages from the specified queue (which the receiver must be registered with).

Deprecated:

Parameters

  queue | Name of the queue to retrieve the list of messages from.
  asyncOpCb | Object implementing the LBMAsyncOperationCallback interface that will receive updates and results for the asynchronous operation.

Exceptions

  LBMException | if queue or asyncObCb parameters are invalid, or if an error occurs.

void com.latencybusters.lbm.LBMReceiverBase.queueMessageList | ( | String | queue,
|  | LBMAsyncOperationCallback | asyncOpCb,
|  | Object | cbArg
| ) |  | throws LBMException
| inherited

Returns a list of currently-enqueued messages from the specified queue (which the receiver must be registered with).

Deprecated:

Parameters

  queue | Name of the queue to retrieve the list of messages from.
  asyncOpCb | Object implementing the LBMAsyncOperationCallback interface that will receive updates and results for the asynchronous operation.
  cbArg | User-supplied callback object which will be passed back when asyncOpCb's onAsyncOperation method is called.

Exceptions

  LBMException | if queue or asyncObCb parameters are invalid, or if an error occurs.

void com.latencybusters.lbm.LBMReceiverBase.queueMessageList | ( | String | queue,
|  | LBMAsyncOperationCallback | asyncOpCb,
|  | Object | cbArg,
|  | String | msgSelector
| ) |  | throws LBMException
| inherited

Returns a list of currently-enqueued messages from the specified queue (which the receiver must be registered with).

Deprecated:

Parameters

  queue | Name of the queue to retrieve the list of messages from.
  asyncOpCb | Object implementing the LBMAsyncOperationCallback interface that will receive updates and results for the asynchronous operation.
  cbArg | User-supplied callback object which will be passed back when asyncOpCb's onAsyncOperation method is called.
  msgSelector | User-supplied message selector string.

Exceptions

  LBMException | if queue or asyncObCb parameters are invalid, or if an error occurs.

void com.latencybusters.lbm.LBMReceiverBase.queueMessageRetrieve | ( | String | queue,
|  | List< UMQMessageId > | messageIDs,
|  | LBMAsyncOperationCallback | asyncOpCb
| ) |  | throws LBMException
| inherited

Retrieves the given list of UMQ messages (specified by UMQMessageId) and their associated status information from the specified queue.

Deprecated:

Parameters

  queue | Name of the queue to retrieve the messages from.
  messageIDs | A list of the UMQ message IDs of the messages desired.
  asyncOpCb | Object implementing the LBMAsyncOperationCallback interface that will receive updates and results for the asynchronous operation.

Exceptions

  LBMException | if queue, asyncObCb, or messageIDs parameters are invalid, or if an error occurs.

void com.latencybusters.lbm.LBMReceiverBase.queueMessageRetrieve | ( | String | queue,
|  | List< UMQMessageId > | messageIDs,
|  | LBMAsyncOperationCallback | asyncOpCb,
|  | Object | cbArg
| ) |  | throws LBMException
| inherited

Retrieves the given list of UMQ messages (specified by UMQMessageId) and their associated status information from the specified queue.

Deprecated:

Parameters

  queue | Name of the queue to retrieve the messages from.
  messageIDs | A list of the UMQ message IDs of the messages desired.
  asyncOpCb | Object implementing the LBMAsyncOperationCallback interface that will receive updates and results for the asynchronous operation.
  cbArg | User-supplied callback object which will be passed back when asyncOpCb's onAsyncOperation method is called.

Exceptions

  LBMException | if queue, asyncObCb, or messageIDs parameters are invalid, or if an error occurs.

int com.latencybusters.lbm.LBMReceiverBase.receiverCount | ( |  | ) |
| inherited

Returns the number of receiver callbacks registered to this receiver

void com.latencybusters.lbm.LBMReceiverBase.removeReceiver | ( | LBMReceiverCallback | cb | ) |
| inherited

Deregister a receiver callback

Parameters

  cb | Previously registered object implementing the LBMReceiverCallback interface

See also
  LBMReceiverCallback
  LBMReceiverBase::addReceiver(LBMReceiverCallback)

void com.latencybusters.lbm.LBMReceiverBase.removeReceiver | ( | LBMReceiverCallback | cb,
|  | Object | cbArg
| ) |  |
| inherited

Deregister a receiver callback (and callback token)

Parameters

  cb | Previously registered object implementing the LBMReceiverCallback interface
  cbArg | Callback token for previously registered object

See also
  LBMReceiverCallback
  LBMReceiverBase::addReceiver(LBMReceiverCallback)

void com.latencybusters.lbm.LBMReceiver.resetStatistics | ( | String | source | ) | throws LBMException

Reset the receiver transport statistics for a particular source.

Parameters

  source | The string version of the source to reset statistics for.

Exceptions

  LBMException | if any error occurred resetting statistics.

void com.latencybusters.lbm.LBMReceiver.resetStatistics | ( |  | ) | throws LBMException

Reset the receiver transport statistics for all sources.

Exceptions

  LBMException | if any error occurred resetting statistics.

void com.latencybusters.lbm.LBMReceiver.setAttributeValue | ( | String | attributeName,
|  | String | attributeValue
| ) |  | throws LBMException

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

Parameters

  attributeName | Name of the attribute to set
  attributeValue | New attribute value

Exceptions

  LBMException | if `attributeName` is not a valid attribute, or `attributeValue` is not a valid value for `attributeName`.

See also
  setProperty

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

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

Set the value of a receiver-related attribute for this receiver.

Parameters

  attributeName | Name of the attribute to set
  attributeValue | New attribute value

Exceptions

  LBMRuntimeException | if `attributeName` is not a valid attribute, or `attributeValue` is not a valid value for `attributeName`.

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

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

void com.latencybusters.lbm.LBMReceiverBase.setSourceClientObject | ( | String | source,
|  | Object | newClientObject
| ) |  | throws LBMEInvalException
| inherited

Set (or change) this receiver's per-source client object for the source with source string matching "source".

Parameters

  source | Source string of source to look for.
  newClientObject | The new per-source client object to use with this source.

Exceptions

  LBMEInvalException | if the source was not found.

void com.latencybusters.lbm.LBMReceiver.subscribeChannel | ( | long | channelNumber,
|  | LBMReceiverCallback | cb,
|  | Object | cbArg
| ) |  | throws LBMException

Subscribe to a given channel

void com.latencybusters.lbm.LBMReceiverBase.umederegister | ( |  | ) | throws LBMException
| inherited

Deregister from all UME Store.

Exceptions

  LBMEOPException | if an error occurs while attempting to deregister.

void com.latencybusters.lbm.LBMReceiverBase.umewrcvderegister | ( |  | ) | throws LBMException
| inherited

Deregister Wildcard receiver from all UME Store.

Exceptions

  LBMEOPException | if an error occurs while attempting to deregister.

void com.latencybusters.lbm.LBMReceiver.unsubscribeChannel | ( | long | channelNumber | ) | throws LBMException

Cancel an existing subscription

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

- LBMReceiver.java