UM Java API  6.16.1
com.latencybusters.lbm.LBMWildcardReceiver Class Reference

Inherits com.latencybusters.lbm.LBMReceiverBase.

Public Member Functions

 LBMWildcardReceiver (LBMContext lbmctx, String pattern, LBMReceiverAttributes lbmrcvattr, LBMWildcardReceiverAttributes lbmwrcvattr) throws LBMException
 
 LBMWildcardReceiver (LBMContext lbmctx, String pattern, LBMReceiverAttributes lbmrcvattr, LBMWildcardReceiverAttributes lbmwrcvattr, LBMEventQueue lbmevq) throws LBMException
 
 LBMWildcardReceiver (LBMContext lbmctx, String pattern, LBMReceiverAttributes lbmrcvattr, LBMWildcardReceiverAttributes lbmwrcvattr, LBMReceiverCallback cb, Object cbArg) throws LBMException
 
 LBMWildcardReceiver (LBMContext lbmctx, String pattern, LBMReceiverAttributes lbmrcvattr, LBMWildcardReceiverAttributes lbmwrcvattr, LBMReceiverCallback cb, Object cbArg, LBMEventQueue lbmevq) throws LBMException
 
LBMConfigOption[] dumpAttributeList ()
 
String getAttributeValue (String attributeName) throws LBMException
 
void setAttributeValue (String attributeName, String attributeValue) throws LBMException
 
void subscribeChannel (long channelNumber, LBMReceiverCallback cb, Object cbArg) throws LBMException
 
void unsubscribeChannel (long channelNumber) throws LBMException
 
void umederegister () 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
 
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 umewrcvderegister () throws LBMException
 
List< LBMMessagebrowseQueueMessages (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

void finalize () throws LBMException
 
int comparePattern (String topic)
 
int onReceive (LBMMessage lbmmsg)
 
int onChannelReceive (LBMMessage lbmmsg, LBMReceiverCallback cb, Object cbArg)
 

Detailed Description

LBM Wildcard 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.LBMWildcardReceiver.LBMWildcardReceiver ( LBMContext  lbmctx,
String  pattern,
LBMReceiverAttributes  lbmrcvattr,
LBMWildcardReceiverAttributes  lbmwrcvattr 
) throws LBMException

Instantiate an LBM Wildcard Receiver object that will receive messages sent to any topic matching the given pattern. 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
lbmctxContext with which to associate the wildcard receiver.
patternPattern used to match topic strings
lbmrcvattrLBMReceiverAttributes to be associated with this wildcard receiver
lbmwrcvattrLBMWildcardReceiverAttributes to be associated with this wildcard receiver
Exceptions
LBMExceptionif the wildcard receiver creation fails.
com.latencybusters.lbm.LBMWildcardReceiver.LBMWildcardReceiver ( LBMContext  lbmctx,
String  pattern,
LBMReceiverAttributes  lbmrcvattr,
LBMWildcardReceiverAttributes  lbmwrcvattr,
LBMEventQueue  lbmevq 
) throws LBMException

Instantiate an LBM Wildcard Receiver object (associated with a specified event queue) that will receive messages sent to any topic matching the given pattern. 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
lbmctxContext with which to associate the wildcard receiver.
patternPattern used to match topic strings
lbmrcvattrLBMReceiverAttributes to be associated with this wildcard receiver
lbmwrcvattrLBMWildcardReceiverAttributes to be associated with this wildcard receiver
lbmevqEvent queue with which to associate the receiver (all receiver events will be posted to this event queue).
Exceptions
LBMExceptionif the wildcard receiver creation fails.
com.latencybusters.lbm.LBMWildcardReceiver.LBMWildcardReceiver ( LBMContext  lbmctx,
String  pattern,
LBMReceiverAttributes  lbmrcvattr,
LBMWildcardReceiverAttributes  lbmwrcvattr,
LBMReceiverCallback  cb,
Object  cbArg 
) throws LBMException

Instantiate an LBM Wildcard Receiver object that will receive messages sent to any topic matching the given pattern.

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

Parameters
lbmctxContext with which to associate the wildcard receiver.
patternPattern used to match topic strings
lbmrcvattrLBMReceiverAttributes to be associated with this wildcard receiver
lbmwrcvattrLBMWildcardReceiverAttributes to be associated with this wildcard receiver
cbAn object implementing the LBMReceiverCallback interface
cbArgCallback object passed as token to callback interface
Exceptions
LBMExceptionif the wildcard receiver creation fails.
com.latencybusters.lbm.LBMWildcardReceiver.LBMWildcardReceiver ( LBMContext  lbmctx,
String  pattern,
LBMReceiverAttributes  lbmrcvattr,
LBMWildcardReceiverAttributes  lbmwrcvattr,
LBMReceiverCallback  cb,
Object  cbArg,
LBMEventQueue  lbmevq 
) throws LBMException

Instantiate an LBM Wildcard Receiver object (associated with a specified event queue) that will receive messages sent to any topic matching the given pattern.

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

Parameters
lbmctxContext with which to associate the wildcard receiver.
patternPattern used to match topic strings
lbmrcvattrLBMReceiverAttributes to be associated with this wildcard receiver
lbmwrcvattrLBMWildcardReceiverAttributes to be associated with this wildcard 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).
Exceptions
LBMExceptionif the wildcard receiver creation fails.

Member Function Documentation

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

Register a receiver callback

Parameters
cbObject 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
cbObject implementing the LBMReceiverCallback interface
cbArgCallback 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
queueName of the queue at which to browse.
maxThe max number of messages to return
timeoutMSTimeout
Exceptions
LBMExceptionif 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.

int com.latencybusters.lbm.LBMWildcardReceiver.comparePattern ( String  topic)
protected

Default wildcard pattern comparison method. This method is called when a pattern match is desired for a topic discovered for a wildcard receiver (if the pattern type attribute is set to "appcb").

Parameters
topicTopic string to evaluate
Returns
0 - indicates that the given topic should be considered part of the wildcard, 1 or more - indicates that the topic should not be considered matching the wildcard.
See also
LBMWildcardReceiverAttributes::setPatternCallback

References com.latencybusters.lbm.LBMWildcardPatternCallback.comparePattern(), com.latencybusters.lbm.LBMWildcardReceiverCreateCallback.onReceiverCreate(), and com.latencybusters.lbm.LBMWildcardReceiverDeleteCallback.onReceiverDelete().

void com.latencybusters.lbm.LBMWildcardReceiver.deregister ( ) throws LBMException

Deregister from all UMQ queues.

Exceptions
LBMEOPExceptionif an error occurs while attempting to deregister.
void com.latencybusters.lbm.LBMWildcardReceiver.deregister ( String  queue) throws LBMException

Deregister from a queue.

Parameters
queueThe name of the queue to deregister from.
Exceptions
LBMEOPExceptionif an error occurs while attempting to deregister.
LBMConfigOption [] com.latencybusters.lbm.LBMWildcardReceiver.dumpAttributeList ( )

Returns an array of LBMConfigOptions.

Returns
Array of LBMConfigOption
void com.latencybusters.lbm.LBMWildcardReceiver.finalize ( ) throws LBMException
protected

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

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

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

Parameters
attributeNameName of the attribute to retrieve
Returns
Value corresponding to the specified attribute name
Exceptions
LBMExceptionif attributeName is not a valid attribute.
void com.latencybusters.lbm.LBMWildcardReceiver.indexRelease ( String  queue,
UMQIndexInfo  index 
) throws LBMException

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

Parameters
queueName of the queue at which to release the index, or null for all queues.
indexThe index to release, or null for all indices.
Exceptions
LBMExceptionif any error occurs.
Since
UMQ 1.2

References com.latencybusters.lbm.LBM.UMQ_INDEX_FLAG_NUMERIC.

void com.latencybusters.lbm.LBMWildcardReceiver.indexStartAssignment ( String  queue) throws LBMException

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

Parameters
queueThe name of the queue to start new index assignment from, or null for all queues.
Exceptions
LBMExceptionif an error occurs while attempting to start index assignment.
Since
UMQ 1.2
void com.latencybusters.lbm.LBMWildcardReceiver.indexStopAssignment ( String  queue) throws LBMException

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

Parameters
queueThe name of the queue to stop new index assignment from, or null for all queues.
Exceptions
LBMExceptionif an error occurs while attempting to stop index assignment.
Since
UMQ 1.2
int com.latencybusters.lbm.LBMReceiverBase.onReceive ( LBMMessage  lbmmsg)
protectedinherited

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
lbmmsgLBMMessage 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
queueName of the queue to retrieve the list of messages 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.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
queueName of the queue to retrieve the list of messages 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.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
queueName of the queue to retrieve the list of messages 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.
msgSelectorUser-supplied message selector string.
Exceptions
LBMExceptionif 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
queueName of the queue to retrieve the messages from.
messageIDsA list of the UMQ message IDs of the messages desired.
asyncOpCbObject implementing the LBMAsyncOperationCallback interface that will receive updates and results for the asynchronous operation.
Exceptions
LBMExceptionif 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
queueName of the queue to retrieve the messages from.
messageIDsA list of the UMQ message IDs of the messages desired.
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, 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
cbPreviously 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
cbPreviously registered object implementing the LBMReceiverCallback interface
cbArgCallback token for previously registered object
See also
LBMReceiverCallback
LBMReceiverBase::addReceiver(LBMReceiverCallback)
void com.latencybusters.lbm.LBMWildcardReceiver.setAttributeValue ( String  attributeName,
String  attributeValue 
) throws LBMException

Set the value of a wildcard receiver-related attribute for this wildcard receiver. 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.
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
sourceSource string of source to look for.
newClientObjectThe new per-source client object to use with this source.
Exceptions
LBMEInvalExceptionif the source was not found.
void com.latencybusters.lbm.LBMWildcardReceiver.subscribeChannel ( long  channelNumber,
LBMReceiverCallback  cb,
Object  cbArg 
) throws LBMException

Subscribe to a given channel

void com.latencybusters.lbm.LBMWildcardReceiver.umederegister ( ) throws LBMException

Deregister from all UME Store.

Exceptions
LBMEOPExceptionif an error occurs while attempting to deregister.
void com.latencybusters.lbm.LBMReceiverBase.umewrcvderegister ( ) throws LBMException
inherited

Deregister Wildcard receiver from all UME Store.

Exceptions
LBMEOPExceptionif an error occurs while attempting to deregister.
void com.latencybusters.lbm.LBMWildcardReceiver.unsubscribeChannel ( long  channelNumber) throws LBMException

Cancel an existing subscription


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