BBjEnterpriseNamespace::setCallbackForVariableChange
Description
In BBj 13.00 and higher, this BBjEnterpriseNamespace method sets a callback that will be called whenever the specified variable is changed.
Syntax
|
Return Value |
Method |
|---|---|
|
void |
setCallbackForVariableChange(String varName, String callbackName) |
|
void |
setCallbackForVariableChange(String varName, CustomObject customObj, String methodName) |
|
void |
setCallbackForVariableChange(String varName, Object object, String methodName) |
Parameters
|
Variable |
Description |
|---|---|
|
varName |
Specifies the name of the object being watched. |
|
callbackName |
Specifies the name of the callback to be called when the value changes. |
|
customObj |
Specifies a CustomObject that has a method which is to be called when value changes. |
|
methodName |
Specifies the method of the Object which is to be called. |
| object |
Specifies a Java Object that has a method which is to be called when value changes. |
Return Value
None.
Remarks
The callback set using setCallbackForVariableChange() will be called whenever the value for the specified variable is set to a new value that is different from its previous value. This is different from a callback set using the setCallbackForVariable(), which will only be called each time the value of a variable is set even if the new value is the same as the old value.
All callbacks that a program registered on a BBjEnterpriseNamespace are removed when that program executes START, STOP, END, or BEGIN. All callbacks registered by a BBj process are removed when the BBj process terminates.
Example
|
Version History
See Also
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.