UM .NET API
6.16.1
|
Creates an LBM HFX object. More...
Public Member Functions | |
LBMHFX (String topic, LBMReceiverCallback cb) | |
Instantiate an LBMHFX object using default attributes. More... | |
LBMHFX (String topic, LBMReceiverCallback cb, LBMEventQueue evq) | |
Instantiate an LBMHFX object using default attributes and specifying an event queue to be used to deliver messages. More... | |
LBMHFX (LBMHFXAttributes attr, String topic, LBMReceiverCallback cb) | |
Instantiate an LBMHFX object using user-specified attributes. More... | |
LBMHFX (LBMHFXAttributes attr, String topic, LBMReceiverCallback cb, LBMEventQueue evq) | |
Instantiate an LBMContext object using user-specified attributes, and specifying an event queue. More... | |
unsafe List< LBMConfigOption > | dumpAttributeList () |
Dump HFX configuration options. More... | |
void | close () |
Close and dispose of this HFX object. All HFXReceiver objects created using this HFX object should be closed before calling this method. More... | |
void | close (LBMOperationCompleteCallback cb, object cbArg) |
Close and dispose of this HFX object. All HFXReceiver objects created using this HFX object should be closed before calling this method. More... | |
LBMHFXReceiver | createReceiver (LBMContext ctx, LBMReceiverAttributes rattr, object cbArg) |
Create a receiver on the specified context, with the specified attributes and callback token. A hot failover receiver is created on the specified context with the attributes passed in. Some attributes related to message delivery may be overridden (e.g. duplicate delivery will be enabled if it is enabled on the HFX object. More... | |
string | getAttributeValue (string attributeName) |
Returns the value of a HFX-related attribute for this HFX. More... | |
void | setAttributeValue (string attributeName, string attributeValue) |
Set the value of a HFX-related attribute for this HFX. More... | |
Protected Member Functions | |
int | onReceive (object cbArg, LBMMessage msg) |
Called when a new message is delivered. More... | |
Creates an LBM HFX object.
This creates an instance of the LBM HFX object, used to combine multiple hot failover streams on different LBMContexts into a single message stream. An HFX object can be used to create LBMHFXReceivers, which receive hot failover messages on a single context and deliver them to the HFX object.
com.latencybusters.lbm.LBMHFX.LBMHFX | ( | String | topic, |
LBMReceiverCallback | cb | ||
) |
Instantiate an LBMHFX object using default attributes.
topic | The topic to be used for receivers created using this HFX object. |
cb | The callback to be invoked for messages received by this HFX object. |
com.latencybusters.lbm.LBMException | Invalid argument or unexpected operational behavior has been encountered by unmanaged LBM C layer function. |
com.latencybusters.lbm.LBMHFX.LBMHFX | ( | String | topic, |
LBMReceiverCallback | cb, | ||
LBMEventQueue | evq | ||
) |
Instantiate an LBMHFX object using default attributes and specifying an event queue to be used to deliver messages.
topic | The topic to be used for receivers created using this HFX object. |
cb | The callback to be invoked for messages received by this HFX object. |
evq | LBM Event Queue to be used when delivering messages. |
com.latencybusters.lbm.LBMException | Invalid argument or unexpected operational behavior has been encountered by unmanaged LBM C layer function. |
com.latencybusters.lbm.LBMHFX.LBMHFX | ( | LBMHFXAttributes | attr, |
String | topic, | ||
LBMReceiverCallback | cb | ||
) |
Instantiate an LBMHFX object using user-specified attributes.
attr | A set of attributes that determine the behavior of the LBMHFX to be created |
topic | The topic to be used for receivers created using this HFX object. |
cb | The callback to be invoked for messages received by this HFX object. |
com.latencybusters.lbm.LBMException | Invalid argument or unexpected operational behavior has been encountered by unmanaged LBM C layer function. |
com.latencybusters.lbm.LBMHFX.LBMHFX | ( | LBMHFXAttributes | attr, |
String | topic, | ||
LBMReceiverCallback | cb, | ||
LBMEventQueue | evq | ||
) |
Instantiate an LBMContext object using user-specified attributes, and specifying an event queue.
attr | A set of attributes that determine the behavior of the LBMHFX to be created |
topic | The topic to be used for receivers created using this HFX object. |
cb | The callback to be invoked for messages received by this HFX object. |
evq | LBM Event Queue to be used when delivering messages. |
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.LBMHFX.close | ( | ) |
Close and dispose of this HFX object. All HFXReceiver objects created using this HFX object should be closed before calling this method.
Warning: It is not safe to call this method from a context thread callback.
The underlying objects may take some time to be deleted. To be informed when deletion is complete, call com.latencybusters.lbm.LBMHFX.close(com.latencybusters.lbm.LBMOperationCompleteCallback, System.Object)
com.latencybusters.lbm.LBMException | Invalid argument or unexpected operational behavior has been encountered by unmanaged LBM C layer function. |
void com.latencybusters.lbm.LBMHFX.close | ( | LBMOperationCompleteCallback | cb, |
object | cbArg | ||
) |
Close and dispose of this HFX object. All HFXReceiver objects created using this HFX object should be closed before calling this method.
Warning: It is not safe to call this method from a context thread callback.
cb | A callback to be delivered when the close() operation is complete |
cbArg | A token to be delivered with the callback |
com.latencybusters.lbm.LBMException | Invalid argument or unexpected operational behavior has been encountered by unmanaged LBM C layer function. |
LBMHFXReceiver com.latencybusters.lbm.LBMHFX.createReceiver | ( | LBMContext | ctx, |
LBMReceiverAttributes | rattr, | ||
object | cbArg | ||
) |
Create a receiver on the specified context, with the specified attributes and callback token. A hot failover receiver is created on the specified context with the attributes passed in. Some attributes related to message delivery may be overridden (e.g. duplicate delivery will be enabled if it is enabled on the HFX object.
ctx | Context on which to create the receiver. |
rattr | Attributes to be used for the receiver. |
cbArg | Callback token to be associated with messages delivered through the newly created receiver. |
unsafe List<LBMConfigOption> com.latencybusters.lbm.LBMHFX.dumpAttributeList | ( | ) |
Dump HFX 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.LBMHFX.getAttributeValue | ( | string | attributeName | ) |
Returns the value of a HFX-related attribute for this HFX.
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().
|
protected |
Called when a new message is delivered.
cbArg | The token passed in when the receiver delivering the message was created |
msg | LBMMessage object encapsulating the message data received. |
References com.latencybusters.lbm.LBM.MSG_EOS, and com.latencybusters.lbm.LBMObjectRecyclerBase.retrieveMessage().
void com.latencybusters.lbm.LBMHFX.setAttributeValue | ( | string | attributeName, |
string | attributeValue | ||
) |
Set the value of a HFX-related attribute for this HFX.
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 |
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().