BBjEnterpriseNamespace::setValue

Description

In BBj 13.0 and higher, this method sets either a BBjString or a BBjNumber object as the  value of a named object within this BBjEnterpriseNamespace.

Syntax

Return Value

Method

void

setValue(string name, Object value)

void

setValue(string name, Object value, long timeoutMillis)

Parameters

Variable

Description

name

Specifies the name of the named BBjString or BBjNumber object.

value

Specifies the BBjString or a BBjNumber value of the named object.

timeoutMillis

Time in milliseconds to wait if named object is currently locked.

Return Value

None.

Remarks

This is equivalent to setValue(name, value, 20). If the named object is currently locked by another BBjEnterpriseNamespace then this version of setValue() will wait up to timeoutMillis milliseconds for the lock to release. If the lock is still in effect after that time, then an error LOCKED will be generated.

Example

rem 'host and authentication information

host$="server"
port = 2552
user$="user"
password$="password"
namespace! = bbjapi().getBBjEnterpriseNamespace(host$,port,"test",user$,password$)

rem 'set Values of the namespace
namespace!.setValue("aKey","100")
namespace!.setValue("bKey","200")

rem 'get Keys and print size
keys! = namespace!.getKeys()

rem 'Remove the values of aKey
namespace!.removeValue("aKey")
print "namespace! size is " + STR(keys!.size())
print "bKey is " + namespace!.getValue("bKey")

See Also

BBjAPI

BBjEnterpriseNamespace

BBjNamespace

Object Variables

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.