BBjEnterpriseNamespace
Description
In BBj 13.0 and higher, BBjEnterpriseNamespace provides a mechanism by which two or more BBj programs on the same network can share data. It also provides methods that allow a program to be notified when that shared data is modified by some other program.
BBjEnterpriseNamespace
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 exactly 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:
BBjEnterpriseNamespace::removeLock(string varName)
BBjEnterpriseNamespace::setLock(string varName,long timeoutMillis)
A BBj program may register/unregister to be notified when the value
of a NamedVariable within a BBjEnterpriseNamespace has changed through
calls to the methods:
BBjEnterpriseNamespace::setCallbackForVariable(string varName,string callback)
BBjEnterpriseNamespace::setCallbackForVariable(string varName, CustomObject customObj, string methodName)
BBjEnterpriseNamespace::setCallbackForVariableChange(string varName, string callback)
BBjEnterpriseNamespace::setCallbackForVariableChange(string varName, CustomObject customObj, string methodName)
BBjEnterpriseNamespace::setCallbackForNamespace(string callback)
BBjEnterpriseNamespace::setCallbackForNamespace(string customObj, string methodName)
BBjEnterpriseNamespace::setCallbackForNamespaceChange(string callback)
BBjEnterpriseNamespace::setCallbackForNamespaceChange(CustomObject customObj, string methodName)
BBjEnterpriseNamespace::removeCallbackForVariable(string varName)
BBjEnterpriseNamespace::removeCallbackForVariableChange(string varName)
BBjEnterpriseNamespace::removeCallbackForNamespace()
BBjEnterpriseNamespace::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) |
BBjObject |
getValue(string name, long timeoutMillis) |
void |
|
void |
|
void |
removeCallbackForVariable(string varName) |
void |
removeCallbackForVariableChange(string varName) |
void |
|
void |
removeLock(string varName) |
void |
setCallbackForNamespace(string callback) |
void |
setCallbackForNamespace(CustomObject custObj, string methodName) |
void |
setCallbackForNamespaceChange(string callback) |
void |
setCallbackForNamespaceChange(CustomObject custObj, string methodName) |
void |
setCallbackForVariable(string varName, string callback) |
void |
setCallbackForVariable(string varName, CustomObject custObj, string methodName) |
void |
setCallbackForVariableChange(string varName, string callback) |
void |
setCallbackForVariableChange(string varName, CustomObject custObj, string methodName) |
void |
setLock(string name, long timeoutMillis) |
void |
setValue(string name, object value) |
void |
setValue(string name, object value, long timeoutMillis) |
void |
removeValue(string name) |
void |
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.