|
|||||||||
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.LBMReceiver
com.latencybusters.lbm.LBMHotFailoverReceiver
public class LBMHotFailoverReceiver
LBM Hot-Failover 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 | |
---|---|
protected |
LBMHotFailoverReceiver(LBMContext lbmctx,
LBMTopic lbmtopic)
Instantiate an LBM Hot-Failover Receiver object associated with a given context and topic. |
protected |
LBMHotFailoverReceiver(LBMContext lbmctx,
LBMTopic lbmtopic,
LBMEventQueue lbmevq)
Instantiate an LBM Hot-Failover Receiver object associated with a given context, topic, and event queue. |
|
LBMHotFailoverReceiver(LBMContext lbmctx,
LBMTopic lbmtopic,
LBMReceiverCallback cb,
java.lang.Object cbArg)
Instantiate an LBM Hot-Failover Receiver object associated with a given context and topic. |
|
LBMHotFailoverReceiver(LBMContext lbmctx,
LBMTopic lbmtopic,
LBMReceiverCallback cb,
java.lang.Object cbArg,
LBMEventQueue lbmevq)
Instantiate an LBM Hot-Failover Receiver object associated with a given context, topic, and event queue. |
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. |
void |
deregister()
Deregister from all UMQ queues. |
void |
deregister(java.lang.String queue)
Deregister from a queue. |
protected void |
finalize()
|
java.lang.String |
getAttributeValue(java.lang.String attributeName)
Returns the value of a receiver-related attribute for this 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 the given receiver. |
void |
indexStartAssignment(java.lang.String queue)
Starts this receiver's eligibility for new index assignments from a queue. |
void |
indexStopAssignment(java.lang.String queue)
Stops this 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 receiver-related attribute for this 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 com.latencybusters.lbm.LBMReceiver |
---|
dumpAttributeList, getStatistics, getStatistics, load, resetStatistics, resetStatistics, setProperty |
Methods inherited from class java.util.Properties |
---|
getProperty, getProperty, list, list, load, loadFromXML, propertyNames, save, 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 |
---|
protected LBMHotFailoverReceiver(LBMContext lbmctx, LBMTopic lbmtopic) throws LBMException
lbmctx
- Context with which to associate the receiver.lbmtopic
- LBMTopic used to initialize the receiver.
LBMException
- if any error occurs creating the hot failover receiver.protected LBMHotFailoverReceiver(LBMContext lbmctx, LBMTopic lbmtopic, LBMEventQueue lbmevq) throws LBMException
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).
LBMException
- if any error occurs creating the hot failover receiver.public LBMHotFailoverReceiver(LBMContext lbmctx, LBMTopic lbmtopic, LBMReceiverCallback cb, java.lang.Object cbArg) throws LBMException
lbmctx
- Context with which to associate the receiver.lbmtopic
- LBMTopic used to initialize the receiver.cb
- An object implementing the LBMReceiverCallback interfacecbArg
- Callback object passed as token to callback interface
LBMException
- if any error occurs creating the hot failover receiver.public LBMHotFailoverReceiver(LBMContext lbmctx, LBMTopic lbmtopic, LBMReceiverCallback cb, java.lang.Object cbArg, LBMEventQueue lbmevq) throws LBMException
lbmctx
- Context with which to associate the receiver.lbmtopic
- LBMTopic used to initialize the receiver.cb
- 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 any error occurs creating the hot failover receiver.Method Detail |
---|
protected void finalize() throws LBMException
finalize
in class LBMReceiver
LBMException
public void subscribeChannel(long channelNumber, LBMReceiverCallback cb, java.lang.Object cbArg) throws LBMException
subscribeChannel
in class LBMReceiver
LBMException
public void unsubscribeChannel(long channelNumber) throws LBMException
unsubscribeChannel
in class LBMReceiver
LBMException
public java.lang.String getAttributeValue(java.lang.String attributeName) throws LBMException
getAttributeValue
in class LBMReceiver
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
setAttributeValue
in class LBMReceiver
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
.LBMReceiver.setProperty(java.lang.String, java.lang.String)
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 umederegister() throws LBMException
LBMEOPException
- if an error occurs while attempting to deregister.
LBMException
public void umewrcvderegister() 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 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 |