|
|||||||||
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.LBMContext
public class LBMContext
Creates an LBM context. This creates an instance of the LBM main processing element, an LBM context. Sources and Receivers are created from an LBM context and work within that context. For the Embedded operational mode, a thread is spawned to handle message processing.
Field Summary |
---|
Fields inherited from class java.util.Properties |
---|
defaults |
Constructor Summary | |
---|---|
LBMContext()
Instantiate an LBMContext object using default attributes. |
|
LBMContext(LBMContextAttributes lbmcattr)
Instantiate an LBMContext object using given attributes. |
Method Summary | |
---|---|
void |
addImmediateMessageReceiver(LBMImmediateMessageCallback cb)
Register a callback for handling of non-topic immediate messages |
void |
addImmediateMessageReceiver(LBMImmediateMessageCallback cb,
java.lang.Object cbArg)
Register a callback (and callback token) for handling of non-topic immediate messages |
void |
addSourceNotifyCallback(LBMSourceNotification cb)
Register a callback interface (and a callback handle argument) to be called when a new source is seen for any topic. |
void |
addSourceNotifyCallback(LBMSourceNotification cb,
java.lang.Object cbArg)
Register a callback interface (and a callback handle argument) to be called when a new source is seen for any topic. |
LBMTopic |
allocTopic(java.lang.String symbol)
Create an LBMTopic object (useable for an LBM source) for given topic name and attributes. |
LBMTopic |
allocTopic(java.lang.String symbol,
LBMSourceAttributes lbmsattr)
Create an LBMTopic object (useable for an LBM source) for given topic name and attributes. |
void |
close()
Close this context. |
LBMHotFailoverReceiver |
createHotFailoverReceiver(LBMTopic lbmtopic)
Deprecated. After LBM 4.0, use createHotFailoverReceiver(LBMTopic,LBMReceiverCallback,Object) |
LBMHotFailoverReceiver |
createHotFailoverReceiver(LBMTopic lbmtopic,
LBMEventQueue lbmevq)
Deprecated. After LBM 4.0, use createHotFailoverReceiver(LBMTopic,LBMReceiverCallback,Object,LBMEventQueue) |
LBMHotFailoverReceiver |
createHotFailoverReceiver(LBMTopic lbmtopic,
LBMReceiverCallback cb,
java.lang.Object cbArg)
Create an LBM Hot-Failover Receiver object associated with this context and a given topic. |
LBMHotFailoverReceiver |
createHotFailoverReceiver(LBMTopic lbmtopic,
LBMReceiverCallback cb,
java.lang.Object cbArg,
LBMEventQueue lbmevq)
Create an LBM Hot-Failover Receiver object associated with this context and a given topic and event queue. |
LBMHotFailoverSource |
createHotFailoverSource(LBMTopic lbmtopic)
Create an LBM Hot-Failover Source object associated with this context and a given topic. |
LBMHotFailoverSource |
createHotFailoverSource(LBMTopic lbmtopic,
LBMEventQueue lbmevq)
Create an LBM Hot-Failover Source object associated with this context and a given topic and event queue. |
LBMHotFailoverSource |
createHotFailoverSource(LBMTopic lbmtopic,
LBMSourceEventCallback cb,
java.lang.Object cbArg)
Create an LBM Hot-Failover Source object associated with this context and a given topic. |
LBMHotFailoverSource |
createHotFailoverSource(LBMTopic lbmtopic,
LBMSourceEventCallback cb,
java.lang.Object cbArg,
LBMEventQueue lbmevq)
Create an LBM Hot-Failover Source object associated with this context and a given topic and event queue. |
LBMReceiver |
createReceiver(LBMTopic lbmtopic)
Deprecated. After LBM 4.0, use createReceiver(LBMTopic,LBMReceiverCallback,Object) |
LBMReceiver |
createReceiver(LBMTopic lbmtopic,
LBMEventQueue lbmevq)
Deprecated. After LBM 4.0, use createReceiver(LBMTopic,LBMReceiverCallback,Object,LBMEventQueue) |
LBMReceiver |
createReceiver(LBMTopic lbmtopic,
LBMReceiverCallback cb,
java.lang.Object cbArg)
Create an LBM Receiver object associated with this context and a given topic. |
LBMReceiver |
createReceiver(LBMTopic lbmtopic,
LBMReceiverCallback cb,
java.lang.Object cbArg,
LBMEventQueue lbmevq)
Create an LBM Receiver object associated with this context and a given topic and event queue. |
LBMSource |
createSource(LBMTopic lbmtopic)
Create an LBM Source object associated with this context and a given topic. |
LBMSource |
createSource(LBMTopic lbmtopic,
LBMEventQueue lbmevq)
Create an LBM Source object associated with this context and a given topic and event queue. |
LBMSource |
createSource(LBMTopic lbmtopic,
LBMSourceEventCallback cb,
java.lang.Object cbArg)
Create an LBM Source object associated with this context and a given topic. |
LBMSource |
createSource(LBMTopic lbmtopic,
LBMSourceEventCallback cb,
java.lang.Object cbArg,
LBMEventQueue lbmevq)
Create an LBM Source object associated with this context and a given topic and event queue. |
LBMTimer |
createTimer(long milliseconds)
Create an LBM Timer object |
LBMTimer |
createTimer(long milliseconds,
LBMEventQueue lbmevq)
Creates a timer associated with this context and a specified event queue that expires with a specified delay. |
LBMTimer |
createTimer(long milliseconds,
LBMTimerCallback cb,
java.lang.Object cbArg)
Creates a timer associated with this context that expires with a specified delay. |
LBMTimer |
createTimer(long milliseconds,
LBMTimerCallback cb,
java.lang.Object cbArg,
LBMEventQueue lbmevq)
Creates a timer associated with this context and a specified event queue that expires with a specified delay. |
LBMConfigOption[] |
dumpAttributeList()
Returns an array of LBMConfigOptions. |
void |
enableImmediateMessageReceiver()
Enable LBM to receive non-topic immediate messages. |
void |
enableImmediateMessageReceiver(LBMEventQueue lbmevq)
Enable LBM to receive non-topic immediate messages (using an event queue). |
protected void |
finalize()
|
java.lang.String |
getAttributeValue(java.lang.String attributeName)
Returns the value of a context-related attribute for this context. |
LBMImmediateMessageReceiverStatistics |
getImmediateMessageReceiverStatistics(int maxStats)
Return the immediate message receiver transport statistics for this context. |
LBMImmediateMessageSourceStatistics |
getImmediateMessageSourceStatistics(int maxStats)
Return the immediate message source transport statistics for this context. |
LBMReceiverStatistics |
getReceiverStatistics(int maxStats)
Return the aggregate set of receiver transport statistics for this context. |
LBMSourceStatistics |
getSourceStatistics(int maxStats)
Return the aggregate set of source transport statistics for this context. |
LBMContextStatistics |
getStatistics()
Return the current set of statistics for this context. |
int |
getUMQInflight(java.lang.String queue)
Get the current UMQ inflight value for this context |
void |
load(java.io.InputStream inStream)
Reads a property (attribute) list (key and element pairs) from the input stream. |
LBMTopic |
lookupTopic(java.lang.String symbol)
Create an LBMTopic object (useable for an LBM receiver) for a given topic name. |
LBMTopic |
lookupTopic(java.lang.String symbol,
LBMReceiverAttributes lbmrattr)
Create an LBMTopic object (useable for an LBM receiver) for given topic name and attributes. |
void |
processEvents(long msec)
Process internal events in the given LBM context object. |
void |
queueTopicList(java.lang.String queue,
LBMAsyncOperationCallback asyncOpCb)
Retrieves a list of currently available topics from a queue (asynchronous operation) |
void |
queueTopicList(java.lang.String queue,
LBMAsyncOperationCallback asyncOpCb,
java.lang.Object cbArg)
Retrieves a list of currently available topics from a queue (asynchronous operation) |
void |
removeImmediateMessageReceiver(LBMImmediateMessageCallback cb)
Deregister a non-topic, immediate message callback |
void |
removeImmediateMessageReceiver(LBMImmediateMessageCallback cb,
java.lang.Object cbArg)
Deregister a non-topic immediate message callback (and callback token) |
void |
removeSourceNotifyCallback(LBMSourceNotification cb)
Deregister a source notification callback |
void |
removeSourceNotifyCallback(LBMSourceNotification cb,
java.lang.Object cbArg)
Deregister a source notification callback |
void |
requestTopicResolution(short flags,
long interval_msec,
long duration_sec)
Request Topic Advertisements (sources), Topic Queries (receivers), and/or Wildcard Topic Queries (wildcard receivers) in the configured topic resolution address domain. |
void |
resetImmediateMessageReceiverStatistics()
Reset the immediate message receiver transport statistics for this context. |
void |
resetImmediateMessageSourceStatistics()
Reset the immediate message source transport statistics for this context. |
void |
resetReceiverStatistics()
Reset the transport statistics for all receivers in this context. |
void |
resetSourceStatistics()
Reset the transport statistics for all sources in this context. |
void |
resetStatistics()
Reset the context statistics for this instance. |
LBMTimer |
scheduleTimer(long milliseconds)
Creates a timer associated with this context that expires with the specified delay, and maintains a reference to it within the context. |
LBMTimer |
scheduleTimer(long milliseconds,
LBMEventQueue lbmevq)
Creates a timer associated with this context that expires with the specified delay, associated with the specified event queue, and maintains a reference to it within the context. |
LBMTimer |
scheduleTimer(long milliseconds,
LBMTimerCallback cb,
java.lang.Object cbArg)
Creates a timer associated with this context that expires with a specified delay, and maintains a reference to it within the context. |
LBMTimer |
scheduleTimer(long milliseconds,
LBMTimerCallback cb,
java.lang.Object cbArg,
LBMEventQueue lbmevq)
Creates a timer associated with this context and a specified event queue that expires with a specified delay, and maintains a reference to it within the context. |
void |
send(java.lang.String topic,
byte[] data,
int dataLength,
int flags)
Send a multicast immediate message to a specific topic. |
LBMRequest |
send(java.lang.String topic,
byte[] data,
int dataLength,
LBMResponseCallback cb,
java.lang.Object cbArg,
int flags)
Send a multicast immediate request to a specific topic |
LBMRequest |
send(java.lang.String topic,
byte[] data,
int dataLength,
LBMResponseCallback cb,
java.lang.Object cbArg,
LBMEventQueue lbmevq,
int flags)
Send a multicast immediate request to a specific topic (specifying an Event Queue for processing of the response(s)) |
void |
send(java.lang.String topic,
LBMRequest lbmreq,
int flags)
Send a multicast immediate request to a specific topic. |
void |
send(java.lang.String topic,
LBMRequest lbmreq,
LBMEventQueue lbmevq,
int flags)
Send a multicast immediate request to a specific topic (specifying an Event Queue for processing of the response(s)). |
void |
send(java.lang.String target,
java.lang.String topic,
byte[] data,
int dataLength,
int flags)
Send a unicast immediate message to a specific topic |
void |
send(java.lang.String queue,
java.lang.String topic,
byte[] data,
int datalength,
int flags,
LBMSourceSendExInfo exinfo)
Send an immediate message on a specific topic to a queue (UMQ only). |
LBMRequest |
send(java.lang.String target,
java.lang.String topic,
byte[] data,
int dataLength,
LBMResponseCallback cb,
java.lang.Object cbArg,
int flags)
Send a unicast immediate request to a specific topic |
LBMRequest |
send(java.lang.String target,
java.lang.String topic,
byte[] data,
int dataLength,
LBMResponseCallback cb,
java.lang.Object cbArg,
LBMEventQueue lbmevq,
int flags)
Send a unicast immediate request to a specific topic (specifying an Event Queue for processing of the response(s)) |
void |
send(java.lang.String target,
java.lang.String topic,
LBMRequest lbmreq,
int flags)
Send a unicast immediate request to a specific topic. |
void |
send(java.lang.String target,
java.lang.String topic,
LBMRequest lbmreq,
LBMEventQueue lbmevq,
int flags)
Send a unicast immediate request to a specific topic (specifying an Event Queue for processing of the response(s)). |
void |
sendc(char[] topic,
byte[] data,
int dataLength,
int flags)
Send a multicast immediate message to a specific topic. |
void |
sendc(char[] target,
char[] topic,
byte[] data,
int dataLength,
int flags)
Send a unicast immediate message to a specific topic |
void |
sendTopicless(byte[] data,
int dataLength,
int flags)
Send a topicless multicast immediate message. |
void |
sendTopicless(char[] target,
byte[] data,
int dataLength,
int flags)
Send a topicless unicast immediate message. |
void |
sendTopicless(java.lang.String target,
byte[] data,
int dataLength,
int flags)
Send a topicless unicast immediate message. |
void |
setAttributeValue(java.lang.String attributeName,
java.lang.String attributeValue)
Set the value of a context-related attribute for this context. |
void |
setAuthCredentials(LBMAuthUserInfo userInfo,
LBMAuthCredentialsCallback authCallback,
java.lang.Object cbArg)
Sets the initial authentication credentials for this context as well as a callback to call if for new credentials if authentication fails. |
java.lang.Object |
setProperty(java.lang.String attributeName,
java.lang.String attributeValue)
Set the current value of an attribute in this set of context attributes. |
int |
setUMQInflight(java.lang.String queue,
LBMSetInflightCallback setInflightCb,
java.lang.Object clientd)
Set the current UMQ inflight value for this context. |
void |
setUMQMessageStable(java.lang.String queue,
UMQMessageId msg_id)
Mark a specific msg_id as stable, triggering an event if configured to do so, and adjusting the inflight if necessary. |
protected int |
sourceNotification(java.lang.String topic,
java.lang.String source)
Default source notification callback. |
void |
unblockProcessEvents()
Unblock processEvents call. |
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 |
---|
public LBMContext() throws LBMException
LBMException
- if any error occurs creating the context.public LBMContext(LBMContextAttributes lbmcattr) throws LBMException
lbmcattr
- LBMContextAttributes used to initialize the context
LBMException
- if any error occurs creating the context.Method Detail |
---|
protected void finalize()
finalize
in class java.lang.Object
public void setAuthCredentials(LBMAuthUserInfo userInfo, LBMAuthCredentialsCallback authCallback, java.lang.Object cbArg) throws LBMException
userInfo
- Initial user credentials.authCallback
- Callback that will be called to obtain different user credentials if authentication fails. Can be null, in which case the same credentials as originally given will be tried each time.cbArg
- User-supplied callback object.
LBMException
- if setting credentials or the callback fails.public void close()
Warning: It is not safe to close() from a context thread callback.
public LBMConfigOption[] dumpAttributeList()
public java.lang.String getAttributeValue(java.lang.String attributeName) throws LBMException
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
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
.setProperty(java.lang.String, java.lang.String)
public java.lang.Object setProperty(java.lang.String attributeName, java.lang.String attributeValue)
setProperty
in class java.util.Properties
attributeName
- Name of the attribute to setattributeValue
- New attribute value
LBMRuntimeException
- if attributeName
is not a valid attribute,
or attributeValue
is not a valid value for attributeName
.public void load(java.io.InputStream inStream) throws java.io.IOException
load
in class java.util.Properties
inStream
- Input stream of bytes
java.io.IOException
- if any I/O error occurs.
LBMRuntimeException
- if any invalid attribute is detected in inStream
.public void processEvents(long msec) throws LBMException
Warning: It is not safe to call this method from a context thread callback.
msec
- Continue event processing loop for at least msec milliseconds before returning.
LBMException
- if any error occurs.public void unblockProcessEvents() throws LBMException
LBMException
- if any error occurs.public LBMTopic lookupTopic(java.lang.String symbol) throws LBMException
Warning: It is not safe to call this method from a context thread callback.
symbol
- Topic name string. Topic strings should be limited in length
to 246 characters (not including the final null).
LBMException
- if any error occurs looking up the topic.public LBMTopic lookupTopic(java.lang.String symbol, LBMReceiverAttributes lbmrattr) throws LBMException
Warning: It is not safe to call this method from a context thread callback.
symbol
- Topic name string. Topic strings should be limited in length
to 246 characters (not including the final null).lbmrattr
- LBMReceiverAttributes object
LBMException
- if any error occurs looking up the topic.public LBMTopic allocTopic(java.lang.String symbol) throws LBMException
Warning: It is not safe to call this method from a context thread callback.
symbol
- Topic name string. Topic strings should be limited in length
to 246 characters (not including the final null).
LBMException
- if any error occurs allocating up the topic.public LBMTopic allocTopic(java.lang.String symbol, LBMSourceAttributes lbmsattr) throws LBMException
Warning: It is not safe to call this method from a context thread callback.
symbol
- Topic name string. Topic strings should be limited in length
to 246 characters (not including the final null).lbmsattr
- LBMSourceAttributes object
LBMException
- if any error occurs allocating up the topic.public void enableImmediateMessageReceiver() throws LBMException
LBMException
- if any error occurs enabling an immediate message receiver.addImmediateMessageReceiver(com.latencybusters.lbm.LBMImmediateMessageCallback)
public void enableImmediateMessageReceiver(LBMEventQueue lbmevq) throws LBMException
lbmevq
- LBMEventQueue on which to process responses (may be null
if not using an event queue)
LBMException
- if any error occurs enabling an immediate message receiver.addImmediateMessageReceiver(com.latencybusters.lbm.LBMImmediateMessageCallback)
public void addImmediateMessageReceiver(LBMImmediateMessageCallback cb)
cb
- Object implementing the LBMImmediateMessageCallback interfaceenableImmediateMessageReceiver()
,
removeImmediateMessageReceiver(com.latencybusters.lbm.LBMImmediateMessageCallback)
,
LBMImmediateMessageCallback
public void addImmediateMessageReceiver(LBMImmediateMessageCallback cb, java.lang.Object cbArg)
cb
- Object implementing the LBMImmediateMessageCallback interfacecbArg
- Callback token objectenableImmediateMessageReceiver()
,
removeImmediateMessageReceiver(com.latencybusters.lbm.LBMImmediateMessageCallback)
,
LBMImmediateMessageCallback
public void removeImmediateMessageReceiver(LBMImmediateMessageCallback cb)
cb
- Object implementing the LBMImmediateMessageCallback interfaceenableImmediateMessageReceiver()
,
addImmediateMessageReceiver(com.latencybusters.lbm.LBMImmediateMessageCallback)
,
LBMImmediateMessageCallback
public void removeImmediateMessageReceiver(LBMImmediateMessageCallback cb, java.lang.Object cbArg)
cb
- Previously registered object implementing the
LBMImmediateMessageCallback interfacecbArg
- Callback token for previously registered objectenableImmediateMessageReceiver()
,
addImmediateMessageReceiver(com.latencybusters.lbm.LBMImmediateMessageCallback)
,
LBMImmediateMessageCallback
public void send(java.lang.String target, java.lang.String topic, byte[] data, int dataLength, int flags) throws LBMException
Warning: It is not safe to call this method from a context thread callback.
target
- Target address of the receiver of the form "TCP:ip:port"topic
- Topic name to send message to or null for non-topicdata
- Data to send in this messagedataLength
- Length (in bytes) of the data to send in this messageflags
- Flags indicating various conditions.
See next section for possible OR'd set of values.
LBMException
- if any error occurs sending the immediate message.LBM.SRC_NONBLOCK
,
LBM.SRC_BLOCK
public void sendTopicless(java.lang.String target, byte[] data, int dataLength, int flags) throws LBMException
Warning: It is not safe to call this method from a context thread callback.
target
- Target address of the receiver of the form "TCP:ip:port"data
- Data to send in this messagedataLength
- Length (in bytes) of the data to send in this messageflags
- Flags indicating various conditions.
See next section for possible OR'd set of values.
LBMException
- if any error occurs sending the immediate message.LBM.SRC_NONBLOCK
,
LBM.SRC_BLOCK
public void sendc(char[] target, char[] topic, byte[] data, int dataLength, int flags) throws LBMException
Warning: It is not safe to call this method from a context thread callback.
target
- Target address of the receiver of the form "TCP:ip:port"topic
- Topic name to send message to or null for non-topicdata
- Data to send in this messagedataLength
- Length (in bytes) of the data to send in this messageflags
- Flags indicating various conditions.
See next section for possible OR'd set of values.
LBMException
- if any error occurs sending the immediate message.LBM.SRC_NONBLOCK
,
LBM.SRC_BLOCK
public void sendTopicless(char[] target, byte[] data, int dataLength, int flags) throws LBMException
Warning: It is not safe to call this method from a context thread callback.
target
- Target address of the receiver of the form "TCP:ip:port"data
- Data to send in this messagedataLength
- Length (in bytes) of the data to send in this messageflags
- Flags indicating various conditions.
See next section for possible OR'd set of values.
LBMException
- if any error occurs sending the immediate message.LBM.SRC_NONBLOCK
,
LBM.SRC_BLOCK
public LBMRequest send(java.lang.String target, java.lang.String topic, byte[] data, int dataLength, LBMResponseCallback cb, java.lang.Object cbArg, LBMEventQueue lbmevq, int flags) throws LBMException
target
- Target address of the receiver of the form "TCP:ip:port"topic
- Topic name to send message to or null for non-topicdata
- Data to send in this requestdataLength
- Length (in bytes) of the data to send in this requestcb
- LBMResponseCallback interface to handle response callbackcbArg
- Callback token objectlbmevq
- LBMEventQueue on which to process responses (may be
null if not using an event queue)flags
- Flags indicating various conditions.
See next section for possible OR'd set of values.
LBMException
- if any error occurs sending the immediate request.LBM.SRC_NONBLOCK
,
LBM.SRC_BLOCK
public LBMRequest send(java.lang.String target, java.lang.String topic, byte[] data, int dataLength, LBMResponseCallback cb, java.lang.Object cbArg, int flags) throws LBMException
target
- Target address of the receiver of the form "TCP:ip:port"topic
- Topic name to send message to or null for non-topicdata
- Data to send in this requestdataLength
- Length (in bytes) of the data to send in this requestcb
- LBMResponseCallback interface to handle response callbackcbArg
- Callback token objectflags
- Flags indicating various conditions.
See next section for possible OR'd set of values.
LBMException
- if any error occurs sending the immediate request.LBM.SRC_NONBLOCK
,
LBM.SRC_BLOCK
public void send(java.lang.String target, java.lang.String topic, LBMRequest lbmreq, LBMEventQueue lbmevq, int flags) throws LBMException
Warning: It is not safe to call this method from a context thread callback.
target
- Target address of the receiver of the form "TCP:ip:port"topic
- Topic name to send message to or null for non-topiclbmreq
- LBMRequest objectlbmevq
- LBMEventQueue on which to process responses (may be
null if not using an event queue)flags
- Flags indicating various conditions.
See next section for possible OR'd set of values.
LBMException
- if any error occurs sending the immediate request.LBM.SRC_NONBLOCK
,
LBM.SRC_BLOCK
public void send(java.lang.String target, java.lang.String topic, LBMRequest lbmreq, int flags) throws LBMException
Warning: It is not safe to call this method from a context thread callback.
target
- Target address of the receiver of the form "TCP:ip:port"topic
- Topic name to send message to or null for non-topiclbmreq
- LBMRequest objectflags
- Flags indicating various conditions.
See next section for possible OR'd set of values.
LBMException
- if any error occurs sending the immediate request.LBM.SRC_NONBLOCK
,
LBM.SRC_BLOCK
public void send(java.lang.String topic, byte[] data, int dataLength, int flags) throws LBMException
Warning: It is not safe to call this method from a context thread callback.
topic
- Topic name to send message to or null for non-topicdata
- Data to send in this messagedataLength
- Length (in bytes) of the data to send in this messageflags
- Flags indicating various conditions.
See next section for possible OR'd set of values.
LBMException
- if any error occurs sending the immediate message.LBM.SRC_NONBLOCK
,
LBM.SRC_BLOCK
,
LBM.MSG_FLUSH
public void sendc(char[] topic, byte[] data, int dataLength, int flags) throws LBMException
Warning: It is not safe to call this method from a context thread callback.
topic
- Topic name to send message to or null for non-topicdata
- Data to send in this messagedataLength
- Length (in bytes) of the data to send in this messageflags
- Flags indicating various conditions.
See next section for possible OR'd set of values.
LBMException
- if any error occurs sending the immediate message.LBM.SRC_NONBLOCK
,
LBM.SRC_BLOCK
,
LBM.MSG_FLUSH
public void sendTopicless(byte[] data, int dataLength, int flags) throws LBMException
Warning: It is not safe to call this method from a context thread callback.
data
- Data to send in this messagedataLength
- Length (in bytes) of the data to send in this messageflags
- Flags indicating various conditions.
See next section for possible OR'd set of values.
LBMException
- if any error occurs sending the immediate message.LBM.SRC_NONBLOCK
,
LBM.SRC_BLOCK
,
LBM.MSG_FLUSH
public LBMRequest send(java.lang.String topic, byte[] data, int dataLength, LBMResponseCallback cb, java.lang.Object cbArg, LBMEventQueue lbmevq, int flags) throws LBMException
topic
- Topic name to send message to or null for non-topicdata
- Data to send in this requestdataLength
- Length (in bytes) of the data to send in this requestcb
- LBMResponseCallback interface to handle response callbackcbArg
- Callback token objectlbmevq
- LBMEventQueue on which to process responses (may be
null if not using an event queue)flags
- Flags indicating various conditions.
See next section for possible OR'd set of values.
LBMException
- if any error occurs sending the immediate request.LBM.SRC_NONBLOCK
,
LBM.SRC_BLOCK
,
LBM.MSG_FLUSH
public LBMRequest send(java.lang.String topic, byte[] data, int dataLength, LBMResponseCallback cb, java.lang.Object cbArg, int flags) throws LBMException
topic
- Topic name to send message to or null for non-topicdata
- Data to send in this requestdataLength
- Length (in bytes) of the data to send in this requestcb
- LBMResponseCallback interface to handle response callbackcbArg
- Callback token objectflags
- Flags indicating various conditions.
See next section for possible OR'd set of values.
LBMException
- if any error occurs sending the immediate request.LBM.SRC_NONBLOCK
,
LBM.SRC_BLOCK
,
LBM.MSG_FLUSH
public void send(java.lang.String topic, LBMRequest lbmreq, LBMEventQueue lbmevq, int flags) throws LBMException
Warning: It is not safe to call this method from a context thread callback.
topic
- Topic name to send message to or null for non-topiclbmreq
- LBMRequest objectlbmevq
- LBMEventQueue on which to process responses (may be
null if not using an event queue)flags
- Flags indicating various conditions.
See next section for possible OR'd set of values.
LBMException
- if any error occurs sending the immediate request.LBM.SRC_NONBLOCK
,
LBM.SRC_BLOCK
,
LBM.MSG_FLUSH
public void send(java.lang.String topic, LBMRequest lbmreq, int flags) throws LBMException
Warning: It is not safe to call this method from a context thread callback.
topic
- Topic name to send message to or null for non-topiclbmreq
- LBMRequest objectflags
- Flags indicating various conditions.
See next section for possible OR'd set of values.
LBMException
- if any error occurs sending the immediate request.LBM.SRC_NONBLOCK
,
LBM.SRC_BLOCK
,
LBM.MSG_FLUSH
public void send(java.lang.String queue, java.lang.String topic, byte[] data, int datalength, int flags, LBMSourceSendExInfo exinfo) throws LBMException
Warning: It is not safe to call this method from a context thread callback.
queue
- Queue to submit message totopic
- Topic name to send message to or null for non-topicdata
- Data to send in this message.dataLength
- Length (in bytes) of the data to send in this message.flags
- Flags indicating various conditions.
See next section for possible OR'd set of values.exinfo
- LBMSourceSendExInfo object; used to set callback behavior flags
and pass back a user-supplied object.
LBMException
- if any error occurs sending the immediate request.LBM.SRC_NONBLOCK
,
LBM.SRC_BLOCK
,
LBM.MSG_FLUSH
,
LBMSourceSendExInfo
public LBMContextStatistics getStatistics() throws LBMException
LBMException
- if any error occurred retrieving context statistics.public void resetStatistics() throws LBMException
LBMException
- if any error occurred during resetting of statistics.public LBMSourceStatistics getSourceStatistics(int maxStats) throws LBMException
maxStats
- Maximum number of sources.
LBMException
- if any error occurred retrieving source transport statistics.public void resetSourceStatistics() throws LBMException
LBMException
- if any error occurred resetting source transport statistics.public LBMReceiverStatistics getReceiverStatistics(int maxStats) throws LBMException
maxStats
- Maximum number of receivers.
LBMException
- if any error occurred retrieving receiver transport statistics.public void resetReceiverStatistics() throws LBMException
LBMException
- if any error occurred resetting receiver transport statistics.public LBMImmediateMessageSourceStatistics getImmediateMessageSourceStatistics(int maxStats) throws LBMException
maxStats
- Maximum number of sources.
LBMException
- if any error occurred retrieving source transport statistics.public void resetImmediateMessageSourceStatistics() throws LBMException
LBMException
- if any error occurred resetting source transport statistics.public LBMImmediateMessageReceiverStatistics getImmediateMessageReceiverStatistics(int maxStats) throws LBMException
maxStats
- Maximum number of receivers.
LBMException
- if any error occurred retrieving receiver transport statistics.public void resetImmediateMessageReceiverStatistics() throws LBMException
LBMException
- if any error occurred resetting receiver transport statistics.public LBMTimer createTimer(long milliseconds) throws LBMException
milliseconds
- Number of milliseconds until the timer expires
LBMException
- if any error occurs creating the timer.public LBMTimer createTimer(long milliseconds, LBMEventQueue lbmevq) throws LBMException
milliseconds
- Number of milliseconds until the timer expireslbmevq
- Event queue with with which to associate this timer
(the timer events will be posted to this event queue)
LBMException
- if any error occurs creating the timer.public LBMTimer createTimer(long milliseconds, LBMTimerCallback cb, java.lang.Object cbArg) throws LBMException
milliseconds
- Number of milliseconds until the timer expirescb
- An object implementing the LBMTimerCallback interfacecbArg
- Callback object passed as token to callback interface
LBMException
- if any error occurs creating the timer.public LBMTimer createTimer(long milliseconds, LBMTimerCallback cb, java.lang.Object cbArg, LBMEventQueue lbmevq) throws LBMException
milliseconds
- Number of milliseconds until the timer expireslbmevq
- Event queue with which to associate this timercb
- An object implementing the LBMTimerCallback interfacecbArg
- Callback object passed as token to callback interface
(the timer events will be posted to this event queue)
LBMException
- if any error occurs creating the timer.public LBMTimer scheduleTimer(long milliseconds) throws LBMException
milliseconds
- Number of milliseconds until the timer expires
LBMException
- if any error occurs creating the timer.public LBMTimer scheduleTimer(long milliseconds, LBMEventQueue lbmevq) throws LBMException
milliseconds
- Number of milliseconds until the timer expireslbmevq
- Event queue with with which to associate this timer
(the timer events will be posted to this event queue)
LBMException
- if any error occurs creating the timer.public LBMTimer scheduleTimer(long milliseconds, LBMTimerCallback cb, java.lang.Object cbArg) throws LBMException
milliseconds
- Number of milliseconds until the timer expirescb
- An object implementing the LBMTimerCallback interfacecbArg
- Callback object passed as token to callback interface
LBMException
- if any error occurs creating the timer.public LBMTimer scheduleTimer(long milliseconds, LBMTimerCallback cb, java.lang.Object cbArg, LBMEventQueue lbmevq) throws LBMException
milliseconds
- Number of milliseconds until the timer expireslbmevq
- Event queue with which to associate this timercb
- An object implementing the LBMTimerCallback interfacecbArg
- Callback object passed as token to callback interface
(the timer events will be posted to this event queue)
LBMException
- if any error occurs creating the timer.public LBMSource createSource(LBMTopic lbmtopic) throws LBMException
Warning: It is not safe to call this method from a context thread callback.
lbmtopic
- LBMTopic used to initialize the source.
LBMException
- if any error occurs creating the source.public LBMSource createSource(LBMTopic lbmtopic, LBMSourceEventCallback cb, java.lang.Object cbArg) throws LBMException
Warning: It is not safe to call this method from a context thread callback.
lbmtopic
- LBMTopic used to initialize the source.cb
- An object implementing the LBMSourceEventCallback interfacecbArg
- Callback token object
LBMException
- if any error occurs creating the source.public LBMSource createSource(LBMTopic lbmtopic, LBMEventQueue lbmevq) throws LBMException
Warning: It is not safe to call this method from a context thread callback.
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 occurs creating the source.public LBMSource createSource(LBMTopic lbmtopic, LBMSourceEventCallback cb, java.lang.Object cbArg, LBMEventQueue lbmevq) throws LBMException
Warning: It is not safe to call this method from a context thread callback.
lbmtopic
- LBMTopic used to initialize the source.cb
- An object implementing the LBMSourceEventCallback interfacecbArg
- Callback token objectlbmevq
- Event queue with which to associate the source
(all source events will be posted to this event queue).
LBMException
- if any error occurs creating the source.public LBMHotFailoverSource createHotFailoverSource(LBMTopic lbmtopic) throws LBMException
Warning: It is not safe to call this method from a context thread callback.
lbmtopic
- LBMTopic used to initialize the source.
LBMException
- if any error occurs creating the hot failover source.public LBMHotFailoverSource createHotFailoverSource(LBMTopic lbmtopic, LBMSourceEventCallback cb, java.lang.Object cbArg) throws LBMException
Warning: It is not safe to call this method from a context thread callback.
lbmtopic
- LBMTopic used to initialize the source.cb
- An object implementing the LBMSourceEventCallback interfacecbArg
- Callback token object
LBMException
- if any error occurs creating the hot failover source.public LBMHotFailoverSource createHotFailoverSource(LBMTopic lbmtopic, LBMEventQueue lbmevq) throws LBMException
Warning: It is not safe to call this method from a context thread callback.
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 occurs creating the hot failover source.public LBMHotFailoverSource createHotFailoverSource(LBMTopic lbmtopic, LBMSourceEventCallback cb, java.lang.Object cbArg, LBMEventQueue lbmevq) throws LBMException
Warning: It is not safe to call this method from a context thread callback.
lbmtopic
- LBMTopic used to initialize the source.cb
- An object implementing the LBMSourceEventCallback interfacecbArg
- Callback token objectlbmevq
- Event queue with which to associate the source
(all source events will be posted to this event queue).
LBMException
- if any error occurs creating the hot failover source.public LBMReceiver createReceiver(LBMTopic lbmtopic) throws LBMException
createReceiver(LBMTopic,LBMReceiverCallback,Object)
Warning: It is not safe to call this method from a context thread callback.
lbmtopic
- LBMTopic used to initialize the receiver.
LBMException
- if any error occurs creating the receiver.public LBMReceiver createReceiver(LBMTopic lbmtopic, LBMEventQueue lbmevq) throws LBMException
createReceiver(LBMTopic,LBMReceiverCallback,Object,LBMEventQueue)
Warning: It is not safe to call this method from a context thread callback.
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 receiver.public LBMReceiver createReceiver(LBMTopic lbmtopic, LBMReceiverCallback cb, java.lang.Object cbArg) throws LBMException
Warning: It is not safe to call this method from a context thread callback.
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 receiver.public LBMReceiver createReceiver(LBMTopic lbmtopic, LBMReceiverCallback cb, java.lang.Object cbArg, LBMEventQueue lbmevq) throws LBMException
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 receiver.public LBMHotFailoverReceiver createHotFailoverReceiver(LBMTopic lbmtopic) throws LBMException
createHotFailoverReceiver(LBMTopic,LBMReceiverCallback,Object)
Warning: It is not safe to call this method from a context thread callback.
lbmtopic
- LBMTopic used to initialize the receiver.
LBMException
- if any error occurs creating the hot failover receiver.public LBMHotFailoverReceiver createHotFailoverReceiver(LBMTopic lbmtopic, LBMEventQueue lbmevq) throws LBMException
createHotFailoverReceiver(LBMTopic,LBMReceiverCallback,Object,LBMEventQueue)
Warning: It is not safe to call this method from a context thread callback.
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 createHotFailoverReceiver(LBMTopic lbmtopic, LBMReceiverCallback cb, java.lang.Object cbArg) throws LBMException
Warning: It is not safe to call this method from a context thread callback.
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 createHotFailoverReceiver(LBMTopic lbmtopic, LBMReceiverCallback cb, java.lang.Object cbArg, LBMEventQueue lbmevq) throws LBMException
Warning: It is not safe to call this method from a context thread callback.
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.public void addSourceNotifyCallback(LBMSourceNotification cb) throws LBMException
LBMContextAttributes.enableSourceNotification()
method prior to
instantiation of LBMContext.
cb
- An object implementing the LBMSourceNotification interface
LBMException
- if any error occurs.LBMSourceNotification
,
LBMContextAttributes.enableSourceNotification()
,
removeSourceNotifyCallback(com.latencybusters.lbm.LBMSourceNotification)
public void addSourceNotifyCallback(LBMSourceNotification cb, java.lang.Object cbArg) throws LBMException
LBMContextAttributes.enableSourceNotification()
method prior to
instantiation of LBMContext.
cb
- An object implementing the LBMSourceNotification interfacecbArg
- Callback object passed as a token to the callback interface
LBMException
- if any error occurs.LBMSourceNotification
,
removeSourceNotifyCallback(com.latencybusters.lbm.LBMSourceNotification)
public void removeSourceNotifyCallback(LBMSourceNotification cb)
cb
- Previously registered object implementing the
LBMSourceNotification interfaceLBMSourceNotification
,
addSourceNotifyCallback(com.latencybusters.lbm.LBMSourceNotification)
public void removeSourceNotifyCallback(LBMSourceNotification cb, java.lang.Object cbArg)
cb
- Previously registered object implementing the
LBMSourceNotification interfacecbArg
- Callback token for previously registered objectLBMSourceNotification
,
addSourceNotifyCallback(com.latencybusters.lbm.LBMSourceNotification)
protected int sourceNotification(java.lang.String topic, java.lang.String source)
topic
- New topic stringsource
- String identifying the source for the new topic
LBMContextAttributes.enableSourceNotification()
,
addSourceNotifyCallback(com.latencybusters.lbm.LBMSourceNotification)
,
removeSourceNotifyCallback(com.latencybusters.lbm.LBMSourceNotification)
public int getUMQInflight(java.lang.String queue) throws LBMException
queue
- Name of the queue
LBMException
- if an error occurs while retrieving the inflight valuepublic int setUMQInflight(java.lang.String queue, LBMSetInflightCallback setInflightCb, java.lang.Object clientd) throws LBMException
queue
- Name of the queuesetInflightCb
- Object that implements the LBMSetInflightCallback interfaceclientd
- Clientd object passed into the setInflight callback
LBMException
- if an error occurs while setting the inflight valuepublic void setUMQMessageStable(java.lang.String queue, UMQMessageId msg_id) throws LBMException
queue
- Name of the queuemsg_id
- MessageId of the message to mark stable
LBMException
- if an error occurs while marking the message stablepublic void requestTopicResolution(short flags, long interval_msec, long duration_sec) throws LBMException
flags
- Flags indicating desired requests. ORed set of values.interval_msec
- Interval between requests in milliseconds. Less than 10 should be used with caution. Less than 5 is not recommended.duration_sec
- Minimum duration of requests in seconds. Actual duration can be longer depending on the interval. A value of zero will result in 1 request and the interval will be meaningless.
LBMException
- Request advertisements from quiescent sources.
,
- Request queries from quiescent receivers.
,
- Request queries from quiescent wildcard receivers.
public void queueTopicList(java.lang.String queue, LBMAsyncOperationCallback asyncOpCb) throws LBMException
queue
- Name of the queue to retrieve topic list 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 queueTopicList(java.lang.String queue, LBMAsyncOperationCallback asyncOpCb, java.lang.Object cbArg) throws LBMException
queue
- Name of the queue to retrieve topic list 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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |