UM Java API
6.16.1
|
Public Member Functions | |
LBMSSource (LBMContext lbmctx, LBMTopic lbmtopic) throws LBMException | |
LBMSSource (LBMContext lbmctx, LBMTopic lbmtopic, LBMSourceEventCallback cb, Object cbArg) throws LBMException | |
LBMSSource (LBMContext lbmctx, LBMTopic lbmtopic, LBMEventQueue lbmevq) throws LBMException | |
LBMSSource (LBMContext lbmctx, LBMTopic lbmtopic, LBMSourceEventCallback cb, Object cbArg, LBMEventQueue lbmevq) throws LBMException | |
void | umederegister () throws LBMException |
void | close () throws LBMException |
boolean | isClosed () |
LBMConfigOption[] | dumpAttributeList () |
void | addSSourceCallback (LBMSourceEventCallback cb) |
void | addSSourceCallback (LBMSourceEventCallback cb, Object cbArg) |
void | removeSSourceCallback (LBMSourceEventCallback cb) |
void | removeSSourceCallback (LBMSourceEventCallback cb, Object cbArg) |
String | getAttributeValue (String attributeName) throws LBMException |
void | setAttributeValue (String attributeName, String attributeValue) throws LBMException |
LBMSourceStatistics | getStatistics () throws LBMException |
void | resetStatistics () throws LBMException |
void | send (ByteBuffer message, int messageLength, int flags) throws LBMException |
void | send (ByteBuffer message, int startPosition, int messageLength, int flags) throws LBMException |
void | send (ByteBuffer message, int messageLength, int flags, LBMSSourceSendExInfo exinfo) throws LBMException |
void | send (ByteBuffer message, int startPosition, int messageLength, int flags, LBMSSourceSendExInfo exinfo) throws LBMException |
ByteBuffer | buffGet () throws LBMException |
int | getSSrcInflight (int type) throws LBMException |
LBMFlightSizeInflightInfo | getSSrcInflightEx (int type) throws LBMException |
int | setSSrcInflight (int type, LBMSetInflightCallback setInflightCb, Object clientd) throws LBMException |
LBMFlightSizeInflightInfo | setSSrcInflightEx (int type, LBMSetInflightCallback setInflightCb, Object clientd) throws LBMException |
void | buffPut (ByteBuffer userBuff) throws LBMException |
int | getAvailableDataSpace () |
Protected Member Functions | |
void | finalize () |
int | onSourceEvent (LBMSourceEvent ssourceEvent) |
LBM SmartSource class.
See Smart Sources for more information on Smart Sources. See also Smart Source Options for configuration information.
Warning: It is not safe to instantiate this object from a context thread callback.
com.latencybusters.lbm.LBMSSource.LBMSSource | ( | LBMContext | lbmctx, |
LBMTopic | lbmtopic | ||
) | throws LBMException |
Instantiate an LBM SmartSource object associated with a given context and topic.
In addition to creating the Smart Source object, this function also creates message buffers associated with the source and transport session.
See Smart Sources for more information. See also Smart Source Options for configuration information.
Warning: It is not safe to call this constructor from a context thread callback.
lbmctx | Context with which to associate the source. |
lbmtopic | LBMTopic used to initialize the source. |
LBMException | if any error occurred during source creation. |
com.latencybusters.lbm.LBMSSource.LBMSSource | ( | LBMContext | lbmctx, |
LBMTopic | lbmtopic, | ||
LBMSourceEventCallback | cb, | ||
Object | cbArg | ||
) | throws LBMException |
Instantiate an LBM SmartSource object associated with a given context and topic and initialize source event callback.
In addition to creating the Smart Source object, this function also creates message buffers associated with the source and transport session.
See Smart Sources for more information. See also Smart Source Options for configuration information.
Warning: It is not safe to call this constructor from a context thread callback.
lbmctx | Context with which to associate the source. |
lbmtopic | LBMTopic used to initialize the source. |
cb | An object implementing the LBMSourceEventCallback interface |
cbArg | Callback token object |
LBMException | if any error occurred during source creation. |
com.latencybusters.lbm.LBMSSource.LBMSSource | ( | LBMContext | lbmctx, |
LBMTopic | lbmtopic, | ||
LBMEventQueue | lbmevq | ||
) | throws LBMException |
Instantiate an LBM SmartSource object associated with a given context, topic, and event queue.
In addition to creating the Smart Source object, this function also creates message buffers associated with the source and transport session.
See Smart Sources for more information. See also Smart Source Options for configuration information.
Warning: It is not safe to call this constructor from a context thread callback.
lbmctx | Context with which to associate the source. |
lbmtopic | LBMTopic used to initialize the source. |
lbmevq | Event queue with which to associate the source (all source events will be posted to this event queue). |
LBMException | if any error occurred during source creation. |
com.latencybusters.lbm.LBMSSource.LBMSSource | ( | LBMContext | lbmctx, |
LBMTopic | lbmtopic, | ||
LBMSourceEventCallback | cb, | ||
Object | cbArg, | ||
LBMEventQueue | lbmevq | ||
) | throws LBMException |
Instantiate an LBM SmartSource object associated with a given context, topic, and event queue and initialize source event callback.
In addition to creating the Smart Source object, this function also creates message buffers associated with the source and transport session.
See Smart Sources for more information. See also Smart Source Options for configuration information.
Warning: It is not safe to call this constructor from a context thread callback.
lbmctx | Context with which to associate the source. |
lbmtopic | LBMTopic used to initialize the source. |
cb | An object implementing the LBMSourceEventCallback interface |
cbArg | Callback token object |
lbmevq | Event Queues not supported at this time |
LBMException | if any error occurred during source creation. |
References com.latencybusters.lbm.LBMSSource.addSSourceCallback(), and com.latencybusters.lbm.LBM.EINVAL.
void com.latencybusters.lbm.LBMSSource.addSSourceCallback | ( | LBMSourceEventCallback | cb | ) |
Register a source event callback
cb | Object implementing the LBMSourceEventCallback interface |
Referenced by com.latencybusters.lbm.LBMSSource.LBMSSource().
void com.latencybusters.lbm.LBMSSource.addSSourceCallback | ( | LBMSourceEventCallback | cb, |
Object | cbArg | ||
) |
Register a source event callback (and callback token)
cb | Object implementing the LBMSourceEventCallback interface |
cbArg | Callback token object |
ByteBuffer com.latencybusters.lbm.LBMSSource.buffGet | ( | ) | throws LBMException |
Return a ByteBuffer that has a SmartSource pre-allocated buffer associated with it.
See Smart Sources for more information on Smart Sources. See also Smart Source Options for configuration information.
LBMException | if any error occurred retrieving a buffer. |
void com.latencybusters.lbm.LBMSSource.buffPut | ( | ByteBuffer | userBuff | ) | throws LBMException |
Return a ByteBuffer to the pool of SmartSource pre-allocated buffers for use later.
See Smart Sources for more information on Smart Sources. See also Smart Source Options for configuration information.
userBuff | A ByteBuffer previously retrieved with a call to buffGet(). |
LBMException | if any error occurred returning the buffer. |
References com.latencybusters.lbm.LBM.EOS.
void com.latencybusters.lbm.LBMSSource.close | ( | ) | throws LBMException |
Close this source.
Note that this function can return while the source callback may still be executing if source events are being delivered via an event queue.
See Smart Sources for more information on Smart Sources. See also Smart Source Options for configuration information.
Warning: It is not safe to call this method from a context thread callback.
LBMException | if any error occurred during source deletion. |
Referenced by com.latencybusters.lbm.LBMSSource.finalize().
LBMConfigOption [] com.latencybusters.lbm.LBMSSource.dumpAttributeList | ( | ) |
Returns an array of LBMConfigOptions
|
protected |
This method is for internal use only, and is not supported for customer applications.
References com.latencybusters.lbm.LBMSSource.close().
String com.latencybusters.lbm.LBMSSource.getAttributeValue | ( | String | attributeName | ) | throws LBMException |
Returns the value of a source-related attribute for this source.
attributeName | Name of the attribute to retrieve |
LBMException | if attributeName is not a valid attribute. |
int com.latencybusters.lbm.LBMSSource.getAvailableDataSpace | ( | ) |
Return the maximum allowable message size (data space) that the configured SmartSource will allow.
See Smart Sources for more information on Smart Sources. See also Smart Source Options for configuration information.
int com.latencybusters.lbm.LBMSSource.getSSrcInflight | ( | int | type | ) | throws LBMException |
Get the current inflight value for this smart source
type | The type of flight size |
LBMException | if an error occurs while retrieving the inflight value |
References com.latencybusters.lbm.LBMSSource.setSSrcInflight().
LBMFlightSizeInflightInfo com.latencybusters.lbm.LBMSSource.getSSrcInflightEx | ( | int | type | ) | throws LBMException |
Get the current inflight values of messages and bytes for this smart source
type | The type of flight size |
LBMException | if an error occurs while retrieving the inflight value |
References com.latencybusters.lbm.LBMSSource.setSSrcInflightEx().
LBMSourceStatistics com.latencybusters.lbm.LBMSSource.getStatistics | ( | ) | throws LBMException |
Return the current set of source transport statistics for this source.
LBMException | if any error occurred retrieving source statistics. |
References com.latencybusters.lbm.LBMSourceStatistics.refresh().
boolean com.latencybusters.lbm.LBMSSource.isClosed | ( | ) |
Returns boolean describing whether this instance has a reference to a valid C source
|
protected |
Default smart source event callback. Although possible, it is not recommended that this function be overridden by subclassing the LBMSSource class. Instead, the source may be initialized using a constructor that specifies an LBMSourceEventCallback interface or by registering (deregistering) the callback using addSSourceCallback() (removeSSourceCallback()).
ssourceEvent | LBMSourceEvent object containing information about the posted source-related event. |
References com.latencybusters.lbm.LBMSourceEventCallback.onSourceEvent(), and com.latencybusters.lbm.LBMSourceEvent.promote().
void com.latencybusters.lbm.LBMSSource.removeSSourceCallback | ( | LBMSourceEventCallback | cb | ) |
Deregister a source event callback
cb | Previously registered object implementing the LBMSourceEventCallback interface |
void com.latencybusters.lbm.LBMSSource.removeSSourceCallback | ( | LBMSourceEventCallback | cb, |
Object | cbArg | ||
) |
Deregister a source event callback (and callback token)
cb | Previously registered object implementing the LBMSourceEventCallback interface |
cbArg | Callback token object |
void com.latencybusters.lbm.LBMSSource.resetStatistics | ( | ) | throws LBMException |
Reset the transport statistics for this source.
LBMException | if any error occurred resetting source statistics. |
void com.latencybusters.lbm.LBMSSource.send | ( | ByteBuffer | message, |
int | messageLength, | ||
int | flags | ||
) | throws LBMException |
Send a message using a pre-allocated buffer to the topic associated with the LBM Smart Source.
See Smart Sources for more information. See also Smart Source Options for configuration information.
message | Data to send in this message. This must be a buffer retrieved via the buffGet() method from this SmartSource. |
messageLength | Number of bytes of data to send in this message |
flags | Flags indicating various conditions. NOT USED AT THIS TIME. Pass in zero (0). |
LBMException | if any error occurred during sending. |
Referenced by com.latencybusters.lbm.LBMSSource.send().
void com.latencybusters.lbm.LBMSSource.send | ( | ByteBuffer | message, |
int | startPosition, | ||
int | messageLength, | ||
int | flags | ||
) | throws LBMException |
Send a message using a pre-allocated buffer to the topic associated with the LBM Smart Source.
See Smart Sources for more information. See also Smart Source Options for configuration information.
message | Data to send in this message. This must be a buffer retrieved via the buffGet() method from this SmartSource. |
startPosition | Must be set to 0 |
messageLength | Number of bytes of data to send in this message |
flags | Flags indicating various conditions. NOT USED AT THIS TIME. Pass in zero (0). |
LBMException | if any error occurred during sending. |
References com.latencybusters.lbm.LBMSSource.send().
void com.latencybusters.lbm.LBMSSource.send | ( | ByteBuffer | message, |
int | messageLength, | ||
int | flags, | ||
LBMSSourceSendExInfo | exinfo | ||
) | throws LBMException |
Send a message using a pre-allocated buffer to the topic associated with the LBM Smart Source.
See Smart Sources for more information. See also Smart Source Options for configuration information.
message | Data to send in this message. This must be a buffer retrieved via the buffGet() method from this SmartSource. |
messageLength | Number of bytes of data to send in this message |
flags | Flags indicating various conditions. NOT USED AT THIS TIME. Pass in zero (0). |
exinfo | LBMSSourceSendExInfo object |
LBMException | if any error occurred during sending. |
void com.latencybusters.lbm.LBMSSource.send | ( | ByteBuffer | message, |
int | startPosition, | ||
int | messageLength, | ||
int | flags, | ||
LBMSSourceSendExInfo | exinfo | ||
) | throws LBMException |
Send a message using a pre-allocated buffer to the topic associated with the LBM Smart Source.
See Smart Sources for more information. See also Smart Source Options for configuration information.
message | Data to send in this message. This must be a buffer retrieved via the buffGet() method from this SmartSource. |
startPosition | Must be set to 0 |
messageLength | Number of bytes of data to send in this message |
flags | Flags indicating various conditions. NOT USED AT THIS TIME. Pass in zero (0). |
exinfo | LBMSSourceSendExInfo object; used to set callback behavior flags and to pass back a user-supplied object. (UME only) |
LBMException | if any error occurred during sending. |
References com.latencybusters.lbm.LBMSSource.send().
void com.latencybusters.lbm.LBMSSource.setAttributeValue | ( | String | attributeName, |
String | attributeValue | ||
) | throws LBMException |
Set the value of a source-related attribute for this source. 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 |
LBMException | if attributeName is not a valid attribute, or attributeValue is not a valid value for attributeName . |
int com.latencybusters.lbm.LBMSSource.setSSrcInflight | ( | int | type, |
LBMSetInflightCallback | setInflightCb, | ||
Object | clientd | ||
) | throws LBMException |
Set the current inflight value for this smart source.
type | The type of flight size |
setInflightCb | Object that implements the LBMSetInflightCallback interface |
clientd | Clientd object passed into the setInflight callback |
LBMException | if an error occurs while setting the inflight value |
Referenced by com.latencybusters.lbm.LBMSSource.getSSrcInflight().
LBMFlightSizeInflightInfo com.latencybusters.lbm.LBMSSource.setSSrcInflightEx | ( | int | type, |
LBMSetInflightCallback | setInflightCb, | ||
Object | clientd | ||
) | throws LBMException |
Set the current inflight messages and bytes value for this smart source. The values are set from within the provided set inflight callback with appropriate locking held.
type | The type of flight size |
setInflightCb | Object that implements the LBMSetInflightCallback interface |
clientd | Clientd object passed into the setInflight callback |
LBMException | if an error occurs while setting the inflight value |
Referenced by com.latencybusters.lbm.LBMSSource.getSSrcInflightEx().
void com.latencybusters.lbm.LBMSSource.umederegister | ( | ) | throws LBMException |
Deregister this smart source
Warning: It is not safe to call this method from a context thread callback.
LBMException | if any error occurred during source deletion. |