|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Dictionary<K,V>
java.util.Hashtable<java.lang.Object,java.lang.Object>
java.util.Properties
com.latencybusters.lbm.LBMWildcardReceiver
public class LBMWildcardReceiver
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.
Field Summary |
---|
Fields inherited from class java.util.Properties |
---|
defaults |
Constructor Summary | |
---|---|
LBMWildcardReceiver(LBMContext lbmctx,
java.lang.String pattern,
LBMReceiverAttributes lbmrcvattr,
LBMWildcardReceiverAttributes lbmwrcvattr)
Instantiate an LBM Wildcard Receiver object that will receive messages sent to any topic matching the given pattern. |
|
LBMWildcardReceiver(LBMContext lbmctx,
java.lang.String pattern,
LBMReceiverAttributes lbmrcvattr,
LBMWildcardReceiverAttributes lbmwrcvattr,
LBMEventQueue lbmevq)
Instantiate an LBM Wildcard Receiver object (associated with a specified event queue) that will receive messages sent to any topic matching the given pattern. |
|
LBMWildcardReceiver(LBMContext lbmctx,
java.lang.String pattern,
LBMReceiverAttributes lbmrcvattr,
LBMWildcardReceiverAttributes lbmwrcvattr,
LBMReceiverCallback cb,
java.lang.Object cbArg)
Instantiate an LBM Wildcard Receiver object that will receive messages sent to any topic matching the given pattern. |
|
LBMWildcardReceiver(LBMContext lbmctx,
java.lang.String pattern,
LBMReceiverAttributes lbmrcvattr,
LBMWildcardReceiverAttributes lbmwrcvattr,
LBMReceiverCallback cb,
java.lang.Object cbArg,
LBMEventQueue lbmevq)
Instantiate an LBM Wildcard Receiver object (associated with a specified event queue) that will receive messages sent to any topic matching the given pattern. |
Method Summary | |
---|---|
void |
addReceiver(LBMReceiverCallback cb)
Register a receiver callback |
void |
addReceiver(LBMReceiverCallback cb,
java.lang.Object cbArg)
Register a receiver callback (and callback token) |
java.util.List<LBMMessage> |
browseQueueMessages(java.lang.String queue,
int max,
long timeoutMS)
Not currently supported. |
void |
close()
Close this receiver. |
protected int |
comparePattern(java.lang.String topic)
Default wildcard pattern comparison method. |
void |
deregister()
Deregister from all UMQ queues. |
void |
deregister(java.lang.String queue)
Deregister from a queue. |
LBMConfigOption[] |
dumpAttributeList()
Returns an array of LBMConfigOptions. |
protected void |
finalize()
|
java.lang.String |
getAttributeValue(java.lang.String attributeName)
Returns the value of a wildcard receiver-related attribute for this wildcard receiver. |
void |
indexRelease(java.lang.String queue,
UMQIndexInfo index)
Instruct the given UMQ queue(s) to release the given UMQ index that is assigned to this wildcard receiver. |
void |
indexStartAssignment(java.lang.String queue)
Starts this wildcard receiver's eligibility for new index assignments from a queue. |
void |
indexStopAssignment(java.lang.String queue)
Stops this wildcard receiver's eligibility for new index assignments from a queue. |
protected int |
onChannelReceive(LBMMessage lbmmsg,
LBMReceiverCallback cb,
java.lang.Object cbArg)
|
protected int |
onReceive(LBMMessage lbmmsg)
Default received message callback. |
void |
queueMessageList(java.lang.String queue,
LBMAsyncOperationCallback asyncOpCb)
Returns a list of currently-enqueued messages from the specified queue (which the receiver must be registered with). |
void |
queueMessageList(java.lang.String queue,
LBMAsyncOperationCallback asyncOpCb,
java.lang.Object cbArg)
Returns a list of currently-enqueued messages from the specified queue (which the receiver must be registered with). |
void |
queueMessageList(java.lang.String queue,
LBMAsyncOperationCallback asyncOpCb,
java.lang.Object cbArg,
java.lang.String msgSelector)
Returns a list of currently-enqueued messages from the specified queue (which the receiver must be registered with). |
void |
queueMessageRetrieve(java.lang.String queue,
java.util.List<UMQMessageId> messageIDs,
LBMAsyncOperationCallback asyncOpCb)
Retrieves the given list of UMQ messages (specified by UMQMessageId) and their associated status information from the specified queue. |
void |
queueMessageRetrieve(java.lang.String queue,
java.util.List<UMQMessageId> messageIDs,
LBMAsyncOperationCallback asyncOpCb,
java.lang.Object cbArg)
Retrieves the given list of UMQ messages (specified by UMQMessageId) and their associated status information from the specified queue. |
int |
receiverCount()
Returns the number of receiver callbacks registered to this receiver |
void |
removeReceiver(LBMReceiverCallback cb)
Deregister a receiver callback |
void |
removeReceiver(LBMReceiverCallback cb,
java.lang.Object cbArg)
Deregister a receiver callback (and callback token) |
void |
setAttributeValue(java.lang.String attributeName,
java.lang.String attributeValue)
Set the value of a wildcard receiver-related attribute for this wildcard receiver. |
void |
setSourceClientObject(java.lang.String source,
java.lang.Object newClientObject)
Set (or change) this receiver's per-source client object for the source with source string matching "source". |
void |
subscribeChannel(long channelNumber,
LBMReceiverCallback cb,
java.lang.Object cbArg)
Subscribe to a given channel |
void |
umederegister()
Deregister from all UME Store. |
void |
umewrcvderegister()
Deregister Wildcard receiver from all UME Store. |
void |
unsubscribeChannel(long channelNumber)
Cancel an existing subscription |
Methods inherited from class java.util.Properties |
---|
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames |
Methods inherited from class java.util.Hashtable |
---|
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LBMWildcardReceiver(LBMContext lbmctx, java.lang.String pattern, LBMReceiverAttributes lbmrcvattr, LBMWildcardReceiverAttributes lbmwrcvattr) throws LBMException
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 stringslbmrcvattr
- LBMReceiverAttributes to be associated with this
wildcard receiverlbmwrcvattr
- LBMWildcardReceiverAttributes to be associated with
this wildcard receiver
LBMException
- if the wildcard receiver creation fails.public LBMWildcardReceiver(LBMContext lbmctx, java.lang.String pattern, LBMReceiverAttributes lbmrcvattr, LBMWildcardReceiverAttributes lbmwrcvattr, LBMEventQueue lbmevq) throws LBMException
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 stringslbmrcvattr
- LBMReceiverAttributes to be associated with this
wildcard receiverlbmwrcvattr
- LBMWildcardReceiverAttributes to be associated with
this wildcard receiverlbmevq
- 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.public LBMWildcardReceiver(LBMContext lbmctx, java.lang.String pattern, LBMReceiverAttributes lbmrcvattr, LBMWildcardReceiverAttributes lbmwrcvattr, LBMReceiverCallback cb, java.lang.Object cbArg) throws LBMException
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 stringslbmrcvattr
- LBMReceiverAttributes to be associated with this
wildcard receiverlbmwrcvattr
- LBMWildcardReceiverAttributes to be associated with
this wildcard receivercb
- An object implementing the LBMReceiverCallback interfacecbArg
- Callback object passed as token to callback interface
LBMException
- if the wildcard receiver creation fails.public LBMWildcardReceiver(LBMContext lbmctx, java.lang.String pattern, LBMReceiverAttributes lbmrcvattr, LBMWildcardReceiverAttributes lbmwrcvattr, LBMReceiverCallback cb, java.lang.Object cbArg, LBMEventQueue lbmevq) throws LBMException
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 stringslbmrcvattr
- LBMReceiverAttributes to be associated with this
wildcard receiverlbmwrcvattr
- LBMWildcardReceiverAttributes to be associated with
this wildcard receivercb
- An object implementing the LBMReceiverCallback interfacecbArg
- Callback object passed as token to callback interfacelbmevq
- 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.Method Detail |
---|
protected void finalize() throws LBMException
LBMException
public LBMConfigOption[] dumpAttributeList()
public java.lang.String getAttributeValue(java.lang.String attributeName) throws LBMException
attributeName
- Name of the attribute to retrieve
LBMException
- if attributeName
is not a valid attribute.public void setAttributeValue(java.lang.String attributeName, java.lang.String attributeValue) throws LBMException
attributeName
- Name of the attribute to setattributeValue
- New attribute value
LBMException
- if attributeName
is not a valid attribute,
or attributeValue
is not a valid value for attributeName
.Properties.setProperty(java.lang.String, java.lang.String)
protected int comparePattern(java.lang.String topic)
topic
- Topic string to evaluate
LBMWildcardReceiverAttributes.setPatternCallback(com.latencybusters.lbm.LBMWildcardPatternCallback, java.lang.Object)
public void subscribeChannel(long channelNumber, LBMReceiverCallback cb, java.lang.Object cbArg) throws LBMException
LBMException
public void unsubscribeChannel(long channelNumber) throws LBMException
LBMException
public void umederegister() throws LBMException
LBMEOPException
- if an error occurs while attempting to deregister.
LBMException
public void deregister() throws LBMException
LBMEOPException
- if an error occurs while attempting to deregister.
LBMException
public void deregister(java.lang.String queue) throws LBMException
queue
- The name of the queue to deregister from.
LBMEOPException
- if an error occurs while attempting to deregister.
LBMException
public void indexStopAssignment(java.lang.String queue) throws LBMException
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.public void indexStartAssignment(java.lang.String queue) throws LBMException
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.public void indexRelease(java.lang.String queue, UMQIndexInfo index) throws LBMException
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.public final void close() throws LBMException
Warning: It is not safe to call this method from a context thread callback.
LBMException
public int receiverCount()
public void addReceiver(LBMReceiverCallback cb)
cb
- Object implementing the LBMReceiverCallback interfaceLBMReceiverCallback
,
removeReceiver(com.latencybusters.lbm.LBMReceiverCallback)
public void addReceiver(LBMReceiverCallback cb, java.lang.Object cbArg)
cb
- Object implementing the LBMReceiverCallback interfacecbArg
- Callback token objectLBMReceiverCallback
,
removeReceiver(com.latencybusters.lbm.LBMReceiverCallback)
public void removeReceiver(LBMReceiverCallback cb)
cb
- Previously registered object implementing the
LBMReceiverCallback interfaceLBMReceiverCallback
,
addReceiver(com.latencybusters.lbm.LBMReceiverCallback)
public void removeReceiver(LBMReceiverCallback cb, java.lang.Object cbArg)
cb
- Previously registered object implementing the
LBMReceiverCallback interfacecbArg
- Callback token for previously registered objectLBMReceiverCallback
,
addReceiver(com.latencybusters.lbm.LBMReceiverCallback)
protected int onReceive(LBMMessage lbmmsg)
lbmmsg
- LBMMessage object containing the received dataaddReceiver(com.latencybusters.lbm.LBMReceiverCallback)
,
removeReceiver(com.latencybusters.lbm.LBMReceiverCallback)
protected int onChannelReceive(LBMMessage lbmmsg, LBMReceiverCallback cb, java.lang.Object cbArg)
public void setSourceClientObject(java.lang.String source, java.lang.Object newClientObject) throws LBMEInvalException
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.public void umewrcvderegister() throws LBMException
LBMEOPException
- if an error occurs while attempting to deregister.
LBMException
public java.util.List<LBMMessage> browseQueueMessages(java.lang.String queue, int max, long timeoutMS) throws LBMException
queue
- Name of the queue at which to browse.max
- The max number of messages to return
LBMException
- if any error occurs.public void queueMessageList(java.lang.String queue, LBMAsyncOperationCallback asyncOpCb) throws LBMException
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.public void queueMessageList(java.lang.String queue, LBMAsyncOperationCallback asyncOpCb, java.lang.Object cbArg) throws LBMException
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.public void queueMessageList(java.lang.String queue, LBMAsyncOperationCallback asyncOpCb, java.lang.Object cbArg, java.lang.String msgSelector) throws LBMException
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.public void queueMessageRetrieve(java.lang.String queue, java.util.List<UMQMessageId> messageIDs, LBMAsyncOperationCallback asyncOpCb) throws LBMException
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.public void queueMessageRetrieve(java.lang.String queue, java.util.List<UMQMessageId> messageIDs, LBMAsyncOperationCallback asyncOpCb, java.lang.Object cbArg) throws LBMException
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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |