UM Java API
6.16.1
|
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< 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 | |
void | finalize () throws LBMException |
int | comparePattern (String topic) |
int | onReceive (LBMMessage lbmmsg) |
int | onChannelReceive (LBMMessage lbmmsg, LBMReceiverCallback cb, Object cbArg) |
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.
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.
lbmctx | Context with which to associate the wildcard receiver. |
pattern | Pattern used to match topic strings |
lbmrcvattr | LBMReceiverAttributes to be associated with this wildcard receiver |
lbmwrcvattr | LBMWildcardReceiverAttributes to be associated with this wildcard receiver |
LBMException | if 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.
lbmctx | Context with which to associate the wildcard receiver. |
pattern | Pattern used to match topic strings |
lbmrcvattr | LBMReceiverAttributes to be associated with this wildcard receiver |
lbmwrcvattr | LBMWildcardReceiverAttributes to be associated with this wildcard receiver |
lbmevq | Event queue with which to associate the receiver (all receiver events will be posted to this event queue). |
LBMException | if 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.
lbmctx | Context with which to associate the wildcard receiver. |
pattern | Pattern used to match topic strings |
lbmrcvattr | LBMReceiverAttributes to be associated with this wildcard receiver |
lbmwrcvattr | LBMWildcardReceiverAttributes to be associated with this wildcard receiver |
cb | An object implementing the LBMReceiverCallback interface |
cbArg | Callback object passed as token to callback interface |
LBMException | if 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.
lbmctx | Context with which to associate the wildcard receiver. |
pattern | Pattern used to match topic strings |
lbmrcvattr | LBMReceiverAttributes to be associated with this wildcard receiver |
lbmwrcvattr | LBMWildcardReceiverAttributes to be associated with this wildcard 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). |
LBMException | if the wildcard receiver creation fails. |
|
inherited |
Register a receiver callback
cb | Object implementing the LBMReceiverCallback interface |
|
inherited |
Register a receiver callback (and callback token)
cb | Object implementing the LBMReceiverCallback interface |
cbArg | Callback token object |
|
inherited |
Not currently supported. When implemented, it will browse messages on the given UMQ queue.
queue | Name of the queue at which to browse. |
max | The max number of messages to return |
timeoutMS | Timeout |
LBMException | if any error occurs. |
|
inherited |
Close this receiver.
Warning: It is not safe to call this method from a context thread callback.
|
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").
topic | Topic string to evaluate |
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.
LBMEOPException | if an error occurs while attempting to deregister. |
void com.latencybusters.lbm.LBMWildcardReceiver.deregister | ( | String | queue | ) | throws LBMException |
Deregister from a queue.
queue | The name of the queue to deregister from. |
LBMEOPException | if an error occurs while attempting to deregister. |
LBMConfigOption [] com.latencybusters.lbm.LBMWildcardReceiver.dumpAttributeList | ( | ) |
Returns an array of LBMConfigOptions.
|
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.
attributeName | Name of the attribute to retrieve |
LBMException | if 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.
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. |
LBMException | if any error occurs. |
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.
queue | The name of the queue to start new index assignment from, or null for all queues. |
LBMException | if an error occurs while attempting to start index assignment. |
void com.latencybusters.lbm.LBMWildcardReceiver.indexStopAssignment | ( | String | queue | ) | throws LBMException |
Stops this wildcard receiver's eligibility for new index assignments from a queue.
queue | The name of the queue to stop new index assignment from, or null for all queues. |
LBMException | if an error occurs while attempting to stop index assignment. |
|
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.
lbmmsg | LBMMessage object containing the received data |
|
inherited |
Returns a list of currently-enqueued messages from the specified queue (which the receiver must be registered with).
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. |
LBMException | if queue or asyncObCb parameters are invalid, or if an error occurs. |
|
inherited |
Returns a list of currently-enqueued messages from the specified queue (which the receiver must be registered with).
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. |
LBMException | if queue or asyncObCb parameters are invalid, or if an error occurs. |
|
inherited |
Returns a list of currently-enqueued messages from the specified queue (which the receiver must be registered with).
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. |
LBMException | if queue or asyncObCb parameters are invalid, or if an error occurs. |
|
inherited |
Retrieves the given list of UMQ messages (specified by UMQMessageId) and their associated status information from the specified queue.
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. |
LBMException | if queue, asyncObCb, or messageIDs parameters are invalid, or if an error occurs. |
|
inherited |
Retrieves the given list of UMQ messages (specified by UMQMessageId) and their associated status information from the specified queue.
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. |
LBMException | if queue, asyncObCb, or messageIDs parameters are invalid, or if an error occurs. |
|
inherited |
Returns the number of receiver callbacks registered to this receiver
|
inherited |
Deregister a receiver callback
cb | Previously registered object implementing the LBMReceiverCallback interface |
|
inherited |
Deregister a receiver callback (and callback token)
cb | Previously registered object implementing the LBMReceiverCallback interface |
cbArg | Callback token for previously registered object |
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.
attributeName | Name of the attribute to set |
attributeValue | New attribute value |
LBMException | if attributeName is not a valid attribute, or attributeValue is not a valid value for attributeName . |
|
inherited |
Set (or change) this receiver's per-source client object for the source with source string matching "source".
source | Source string of source to look for. |
newClientObject | The new per-source client object to use with this source. |
LBMEInvalException | if 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.
LBMEOPException | if an error occurs while attempting to deregister. |
|
inherited |
Deregister Wildcard receiver from all UME Store.
LBMEOPException | if an error occurs while attempting to deregister. |
void com.latencybusters.lbm.LBMWildcardReceiver.unsubscribeChannel | ( | long | channelNumber | ) | throws LBMException |
Cancel an existing subscription