UM .NET API  6.16
com.latencybusters.lbm.LBMReceiver Class Reference

LBM Receiver class. More...

Inheritance diagram for com.latencybusters.lbm.LBMReceiver:
com.latencybusters.lbm.LBMHotFailoverReceiver

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< LBMConfigOptiondumpAttributeList ()
 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...
 

Detailed Description

LBM Receiver class.

Warning: It is not safe to instantiate this class from a context thread callback.

Constructor & Destructor Documentation

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.

Parameters
lbmctxContext with which to associate the receiver
lbmtopicLBMTopic used to initialize the receiver
cbCallback implementing the LBMReceiverCallback delegate interface
cbArgCallback object passed as token to callback interface
Exceptions
com.latencybusters.lbm.LBMEInvalExceptionTopic 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.

Parameters
lbmctxContext with which to associate the receiver
lbmtopicLBMTopic used to initialize the receiver
cbCallback implementing the LBMReceiverCallback delegate 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
com.latencybusters.lbm.LBMEInvalExceptionTopic is not a receiver topic
com.latencybusters.lbm.LBMExceptionInvalid 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().

Member Function Documentation

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.

See also
LBMReceiverCallback
removeReceiver
Parameters
cbCallback 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.

See also
LBMReceiverCallback
removeReceiver
Parameters
cbCallback implementing the LBMReceiverCallback delegate interface
cbArgCallback 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.

Exceptions
com.latencybusters.lbm.LBMExceptionAn 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.

Parameters
queueThe queue to deregister from
Exceptions
com.latencybusters.lbm.LBMExceptionAn 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.

See also
close
Exceptions
com.latencybusters.lbm.LBMExceptionInvalid 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.

Exceptions
com.latencybusters.lbm.LBMExceptionInvalid argument or unexpected operational behavior has been encountered by unmanaged LBM C layer function.
Returns
An array of LBMConfigOptions

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.

Parameters
attributeNameName of the attribute to retrieve
Exceptions
com.latencybusters.lbm.LBMExceptionInvalid argument or unexpected operational behavior has been encountered by unmanaged LBM C layer function.
Returns
Value corresponding to the specified attribute name

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.

Parameters
sourceSource string (as returned by LBMMesage source()) that specifies the set of statistics to return
Returns
LBMReceiverStatistics object containing the statistics corresponding to the specified source

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.

Parameters
maxStatsMaximum number of sources
Returns
LBMReceiverStatistics object containing the statistics corresponding to the specified 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.

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.

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.

Parameters
queueThe 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.

Parameters
queueThe 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.

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.

See also
LBMReceiverCallback
addReceiver
Parameters
cbPreviously 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.

See also
LBMReceiverCallback
addReceiver
Parameters
cbPreviously registered callback implementing the LBMReceiverCallback delegate interface
cbArgCallback 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.

Parameters
sourceThe string version of the source to reset statistics for.
Exceptions
com.latencybusters.lbm.LBMExceptionInvalid 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.

Exceptions
com.latencybusters.lbm.LBMExceptionInvalid 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.

Parameters
attributeNameName of the attribute to set
attributeValueNew attribute value
Exceptions
com.latencybusters.lbm.LBMExceptionInvalid 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 void com.latencybusters.lbm.LBMReceiver.subscribeChannel ( long  channelNumber,
LBMReceiverCallback  cb,
Object  cbArg 
)
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.

Parameters
channelNumberA positive integer indicating the channel to subscribe to
cbAn option callback to be called for messages on the specified channel
cbArgA token to be passed to the specified callback. If null is specified for the cb argument, this argument will be ignored.
Exceptions
com.latencybusters.lbm.LBMExceptionInvalid 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.

Exceptions
com.latencybusters.lbm.LBMExceptionAn error occurred while attempting to deregister

References com.latencybusters.lbm.LBM.errorMessage(), and com.latencybusters.lbm.LBM.errorNumber().

virtual void com.latencybusters.lbm.LBMReceiver.unsubscribeChannel ( long  channelNumber)
virtual

Discontinue an existing channel subscription.

Parameters
channelNumberA positive integer indicating that channel to unsubscribe from
Exceptions
com.latencybusters.lbm.LBMExceptionInvalid 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().


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