UM .NET API
6.16.1
|
Classes | |
struct | lbm_event_queue_cancel_cb_info_t |
struct | lbmtmgr_channel_rcv_cb_clientd_t |
struct | lbmtmgr_rcv_cb_clientd_t |
struct | lbmtmgr_rcv_t |
Public Member Functions | |
LBMReceiver (LBMContext lbmctx, LBMTopic lbmtopic, LBMReceiverCallback cb, object cbArg) | |
Instantiate an LBM Receiver object associated with a given context and topic, with an initial receiver callback and callback object set. More... | |
LBMReceiver (LBMContext lbmctx, LBMTopic lbmtopic, LBMReceiverCallback cb, object cbArg, LBMEventQueue lbmevq) | |
Instantiate an LBM Receiver object associated with a given context, topic, and event queue, with an initial receiver callback and callback object set. More... | |
void | close () |
Close and dispose of this receiver. More... | |
int | receiverCount () |
Returns the number of receiver callbacks registered to this receiver. More... | |
void | addReceiver (LBMReceiverCallback cb) |
Register a receiver callback. More... | |
void | addReceiver (LBMReceiverCallback cb, object cbArg) |
Register a receiver callback. More... | |
void | removeReceiver (LBMReceiverCallback cb) |
Deregister a receiver callback. More... | |
void | removeReceiver (LBMReceiverCallback cb, object cbArg) |
Deregister a receiver callback (and callback token) More... | |
unsafe List< LBMConfigOption > | dumpAttributeList () |
Dump source configuration options. More... | |
string | getAttributeValue (string attributeName) |
Returns the value of a receiver-related attribute for this receiver. More... | |
void | setAttributeValue (string attributeName, string attributeValue) |
Set the value of a receiver-related attribute for this receiver. More... | |
LBMReceiverStatistics | getStatistics (string source) |
Return the current set of receiver transport statistics for a particular source. More... | |
void | resetStatistics (string source) |
Reset the current set of receiver transport statistics for a particular source. More... | |
LBMReceiverStatistics | getStatistics (int maxStats) |
Return the current set of receiver transport statistics for all sources. More... | |
void | resetStatistics () |
Reset the receiver transport statistics for all sources. More... | |
virtual void | subscribeChannel (long channelNumber, LBMReceiverCallback cb, Object cbArg) |
Subscribe to the given channel, with an optional callback and token object. The specified callback will be called to deliver messages sent with the specified channel number. If null is specified for the callback, messages sent with the specified channel number will be delivered to the receiver's normal callback. Only one callback may be registered for a given channel. If this method is called twice with the same channel number, an error will result. More... | |
virtual void | unsubscribeChannel (long channelNumber) |
Discontinue an existing channel subscription. More... | |
void | umederegister () |
Deregister from all stores. More... | |
void | deregister () |
Deregister from all queues. More... | |
void | deregister (String queue) |
Deregister from a single queue, specified by name. More... | |
void | indexStopAssignment (String queue) |
Stops this receiver's eligibility for new index assignments from a queue. More... | |
void | indexStartAssignment (String queue) |
Starts this receiver's eligibility for new index assignments from a queue. More... | |
void | indexRelease (String queue, UMQIndexInfo index) |
Instruct the given UMQ queue(s) to release the given UMQ index that is assigned to the given receiver. More... | |
void | Dispose () |
Same as close. More... | |
LBM Receiver class.
Warning: It is not safe to instantiate this class from a context thread callback.
com.latencybusters.lbm.LBMReceiver.LBMReceiver | ( | LBMContext | lbmctx, |
LBMTopic | lbmtopic, | ||
LBMReceiverCallback | cb, | ||
object | cbArg | ||
) |
Instantiate an LBM Receiver object associated with a given context and topic, with an initial receiver callback and callback object set.
Warning: It is not safe to call this constructor from a context thread callback.
lbmctx | Context with which to associate the receiver |
lbmtopic | LBMTopic used to initialize the receiver |
cb | Callback implementing the LBMReceiverCallback delegate interface |
cbArg | Callback object passed as token to callback interface |
com.latencybusters.lbm.LBMEInvalException | Topic is not a receiver topic |
com.latencybusters.lbm.LBMReceiver.LBMReceiver | ( | LBMContext | lbmctx, |
LBMTopic | lbmtopic, | ||
LBMReceiverCallback | cb, | ||
object | cbArg, | ||
LBMEventQueue | lbmevq | ||
) |
Instantiate an LBM Receiver object associated with a given context, topic, and event queue, with an initial receiver callback and callback object set.
Warning: It is not safe to call this constructor from a context thread callback.
lbmctx | Context with which to associate the receiver |
lbmtopic | LBMTopic used to initialize the receiver |
cb | Callback implementing the LBMReceiverCallback delegate 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) |
com.latencybusters.lbm.LBMEInvalException | Topic is not a receiver topic |
com.latencybusters.lbm.LBMException | Invalid argument or unexpected operational behavior has been encountered by unmanaged LBM C layer function. |
References com.latencybusters.lbm.LBM.EINVAL, com.latencybusters.lbm.LBM.errorMessage(), com.latencybusters.lbm.LBM.errorNumber(), and com.latencybusters.lbm.LBMReceiverCallback().
void com.latencybusters.lbm.LBMReceiver.addReceiver | ( | LBMReceiverCallback | cb | ) |
Register a receiver callback.
If the single receiver callback mode is enabled, this API has no effect and will log a warning if invoked.
cb | Callback implementing the LBMReceiverCallback delegate interface |
void com.latencybusters.lbm.LBMReceiver.addReceiver | ( | LBMReceiverCallback | cb, |
object | cbArg | ||
) |
Register a receiver callback.
If the single receiver callback mode is enabled, this API has no effect and will log a warning if invoked.
cb | Callback implementing the LBMReceiverCallback delegate interface |
cbArg | Callback token object |
References com.latencybusters.lbm.LBM.LOG_WARNING.
void com.latencybusters.lbm.LBMReceiver.close | ( | ) |
Close and dispose of this receiver.
Warning: It is not safe to call this method from a context thread callback.
void com.latencybusters.lbm.LBMReceiver.deregister | ( | ) |
Deregister from all queues.
com.latencybusters.lbm.LBMException | An error occurred while attempting to deregister |
References com.latencybusters.lbm.LBM.errorMessage(), and com.latencybusters.lbm.LBM.errorNumber().
void com.latencybusters.lbm.LBMReceiver.deregister | ( | String | queue | ) |
Deregister from a single queue, specified by name.
queue | The queue to deregister from |
com.latencybusters.lbm.LBMException | An error occurred while attempting to deregister |
References com.latencybusters.lbm.LBM.errorMessage(), and com.latencybusters.lbm.LBM.errorNumber().
void com.latencybusters.lbm.LBMReceiver.Dispose | ( | ) |
Same as close.
com.latencybusters.lbm.LBMException | Invalid argument or unexpected operational behavior has been encountered by unmanaged LBM C layer function. |
References com.latencybusters.lbm.LBM.errorMessage(), and com.latencybusters.lbm.LBM.errorNumber().
unsafe List<LBMConfigOption> com.latencybusters.lbm.LBMReceiver.dumpAttributeList | ( | ) |
Dump source configuration options.
com.latencybusters.lbm.LBMException | Invalid argument or unexpected operational behavior has been encountered by unmanaged LBM C layer function. |
References com.latencybusters.lbm.LBM.errorMessage(), com.latencybusters.lbm.LBM.errorNumber(), com.latencybusters.lbm.LBMConfigOption.OptionName, com.latencybusters.lbm.LBMConfigOption.Type, and com.latencybusters.lbm.LBMConfigOption.Value.
string com.latencybusters.lbm.LBMReceiver.getAttributeValue | ( | string | attributeName | ) |
Returns the value of a receiver-related attribute for this receiver.
attributeName | Name of the attribute to retrieve |
com.latencybusters.lbm.LBMException | Invalid argument or unexpected operational behavior has been encountered by unmanaged LBM C layer function. |
References com.latencybusters.lbm.LBM.errorMessage(), and com.latencybusters.lbm.LBM.errorNumber().
LBMReceiverStatistics com.latencybusters.lbm.LBMReceiver.getStatistics | ( | string | source | ) |
Return the current set of receiver transport statistics for a particular source.
source | Source string (as returned by LBMMesage source()) that specifies the set of statistics to return |
References com.latencybusters.lbm.LBMReceiverStatistics.refresh(), and com.latencybusters.lbm.LBMObjectRecyclerBase.retrieveReceiverStatistics().
LBMReceiverStatistics com.latencybusters.lbm.LBMReceiver.getStatistics | ( | int | maxStats | ) |
Return the current set of receiver transport statistics for all sources.
maxStats | Maximum number of sources |
References com.latencybusters.lbm.LBMReceiverStatistics.refresh(), and com.latencybusters.lbm.LBMObjectRecyclerBase.retrieveReceiverStatistics().
void com.latencybusters.lbm.LBMReceiver.indexRelease | ( | String | queue, |
UMQIndexInfo | index | ||
) |
Instruct the given UMQ queue(s) to release the given UMQ index that is assigned to the given 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. |
References com.latencybusters.lbm.LBM.errorMessage(), com.latencybusters.lbm.LBM.errorNumber(), com.latencybusters.lbm.UMQIndexInfo.flags(), com.latencybusters.lbm.UMQIndexInfo.index(), com.latencybusters.lbm.UMQIndexInfo.indexLength(), com.latencybusters.lbm.UMQIndexInfo.numericIndex(), and com.latencybusters.lbm.LBM.UMQ_INDEX_FLAG_NUMERIC.
void com.latencybusters.lbm.LBMReceiver.indexStartAssignment | ( | String | queue | ) |
Starts this 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. |
References com.latencybusters.lbm.LBM.errorMessage(), and com.latencybusters.lbm.LBM.errorNumber().
void com.latencybusters.lbm.LBMReceiver.indexStopAssignment | ( | String | queue | ) |
Stops this 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. |
References com.latencybusters.lbm.LBM.errorMessage(), and com.latencybusters.lbm.LBM.errorNumber().
int com.latencybusters.lbm.LBMReceiver.receiverCount | ( | ) |
Returns the number of receiver callbacks registered to this receiver.
void com.latencybusters.lbm.LBMReceiver.removeReceiver | ( | LBMReceiverCallback | cb | ) |
Deregister a receiver callback.
If the single receiver callback mode is enabled, this API has no effect and will log a warning if invoked.
cb | Previously registered callback implementing the LBMReceiverCallback delegate interface |
void com.latencybusters.lbm.LBMReceiver.removeReceiver | ( | LBMReceiverCallback | cb, |
object | cbArg | ||
) |
Deregister a receiver callback (and callback token)
If the single receiver callback mode is enabled, this API has no effect and will log a warning if invoked.
cb | Previously registered callback implementing the LBMReceiverCallback delegate interface |
cbArg | Callback token for previously registered callback |
References com.latencybusters.lbm.LBMMessage.Dispose(), com.latencybusters.lbm.LBMReceiverCallback(), com.latencybusters.lbm.LBM.LOG_WARNING, and com.latencybusters.lbm.LBMObjectRecyclerBase.retrieveMessage().
void com.latencybusters.lbm.LBMReceiver.resetStatistics | ( | string | source | ) |
Reset the current set of receiver transport statistics for a particular source.
source | The string version of the source to reset statistics for. |
com.latencybusters.lbm.LBMException | Invalid argument or unexpected operational behavior has been encountered by unmanaged LBM C layer function. |
References com.latencybusters.lbm.LBM.errorMessage(), and com.latencybusters.lbm.LBM.errorNumber().
void com.latencybusters.lbm.LBMReceiver.resetStatistics | ( | ) |
Reset the receiver transport statistics for all sources.
com.latencybusters.lbm.LBMException | Invalid argument or unexpected operational behavior has been encountered by unmanaged LBM C layer function. |
References com.latencybusters.lbm.LBM.errorMessage(), and com.latencybusters.lbm.LBM.errorNumber().
void com.latencybusters.lbm.LBMReceiver.setAttributeValue | ( | string | attributeName, |
string | attributeValue | ||
) |
Set the value of a receiver-related attribute for this receiver.
attributeName | Name of the attribute to set |
attributeValue | New attribute value |
com.latencybusters.lbm.LBMException | Invalid argument or unexpected operational behavior has been encountered by unmanaged LBM C layer function. |
References com.latencybusters.lbm.LBM.errorMessage(), and com.latencybusters.lbm.LBM.errorNumber().
|
virtual |
Subscribe to the given channel, with an optional callback and token object. The specified callback will be called to deliver messages sent with the specified channel number. If null is specified for the callback, messages sent with the specified channel number will be delivered to the receiver's normal callback. Only one callback may be registered for a given channel. If this method is called twice with the same channel number, an error will result.
channelNumber | A positive integer indicating the channel to subscribe to |
cb | An option callback to be called for messages on the specified channel |
cbArg | A token to be passed to the specified callback. If null is specified for the cb argument, this argument will be ignored. |
com.latencybusters.lbm.LBMException | Invalid argument or unexpected operational behavior has been encountered by unmanaged LBM C layer function. Most likely due to attempting to subscribe to a channel for which a subscription already exists. |
Reimplemented in com.latencybusters.lbm.LBMHotFailoverReceiver.
References com.latencybusters.lbm.LBM.errorMessage(), and com.latencybusters.lbm.LBM.errorNumber().
void com.latencybusters.lbm.LBMReceiver.umederegister | ( | ) |
Deregister from all stores.
com.latencybusters.lbm.LBMException | An error occurred while attempting to deregister |
References com.latencybusters.lbm.LBM.errorMessage(), and com.latencybusters.lbm.LBM.errorNumber().
|
virtual |
Discontinue an existing channel subscription.
channelNumber | A positive integer indicating that channel to unsubscribe from |
com.latencybusters.lbm.LBMException | Invalid argument or unexpected operational behavior has been encountered by unmanaged LBM C layer function. Most likely due to attempting to unsubscribe from a channel that was not previously subscribed to |
Reimplemented in com.latencybusters.lbm.LBMHotFailoverReceiver.
References com.latencybusters.lbm.LBM.errorMessage(), and com.latencybusters.lbm.LBM.errorNumber().