BBjEnterpriseNamespace
Description
In BBj 13.00 and higher, BBjEnterpriseNamespace is used to share information between separate BBjServices processes. It provides a way for BBj programs on the same network to both share data and be notified when shared data is modified by another program.
Usage
A BBjEnterpriseNamespace reference may be obtained by
any BBj program through a call to the following method:
BBjAPI::getBBjEnterpriseNamespace(string host, int port, string name, string user, string password)
The BBjEnterpriseNamespace will be created the first
time a reference is requested and will exist until the host
BBjServices terminates or it is explicitly removed.
The methods of a BBjEnterpriseNamespace
are the same as a regular BBjNamespace, with the exception that
only BBjStrings and BBjNumbers can be set as values.
The name of any BBjEnterpriseNamespace may be obtained by calling the
method:
BBjEnterpriseNamespace::getName()
The NamedVariables within a BBjEnterpriseNamespace may be set and
retrieved by calling the methods:
BBjEnterpriseNamespace::getValue(string varName)
BBjEnterpriseNamespace::getValue(string varName, long timeoutMillis)
BBjEnterpriseNamespace::setValue(string varName, Object value)
BBjEnterpriseNamespace::setValue(string varName, Object value, long timeoutMillis)
BBjEnterpriseNamespace::setValue(string varName, BBjNumber value)
BBjEnterpriseNamespace::setValue(string varName, BBjNumber value, long timeoutMillis)
The value of a NamedVariable within a BBjEnterpriseNamespace may be locked/unlocked
through calls to setLock and removeLock.
A BBj program may register or unregister to be notified when the value
of a NamedVariable within a BBjEnterpriseNamespace has changed through
calls to the methods setCallbackForVariable, setCallbackForVariableChange, setCallbackForNamespace, setCallbackForNamespaceChange, removeCallbackForVariable, removeCallbackForVariableChange, removeCallbackForNamespace, and removeCallbackForNamespaceChange.
Creation
BBjAPI > BBjEnterpriseNamespace
The BBjEnterpriseNamespace object is created through the following BBjAPI object methods:
|
Return Value |
Method |
|---|---|
|
BBjEnterpriseNamespace |
getBBjEnterpriseNamespace(string host, int port, string name, string user, string password) |
Methods of BBjEnterpriseNamespace
|
Return Value |
Method |
|---|---|
|
void |
clear() |
|
java.util.HashMap |
cloneMap() |
|
void |
enableCallbacks(int enable) |
|
getKeys() |
|
|
string |
getName() |
|
BBjObject |
getValue(string name) getValue(string name, long timeoutMillis) |
|
void |
|
|
void |
|
|
void |
removeCallbackForVariable(string varName) |
|
void |
removeCallbackForVariableChange(string varName) |
|
void |
removeLock(string varName) |
|
void |
setCallbackForNamespace(string callback) setCallbackForNamespace(CustomObject custObj, string methodName) |
|
void |
setCallbackForNamespaceChange(string callback) setCallbackForNamespaceChange(CustomObject custObj, string methodName) |
|
void |
setCallbackForVariable(string varName, string callback) setCallbackForVariable(string varName, CustomObject custObj, string methodName) |
|
void |
setCallbackForVariableChange(string varName, string callback) setCallbackForVariableChange(string varName, CustomObject custObj, string methodName) |
|
void |
setLock(string name, long timeoutMillis) |
|
void |
setValue(string name, object value) setValue(string name, object value, long timeoutMillis) |
|
void |
removeValue(string name) removeValue(string name, long timeoutMillis) |
Example
|
See Also
BBj Object Creation and Assignment
Accessing Objects From Different Interpreters
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.