BBjAPI::killSession

Description

In BBj 4.0 and higher, this method kills a running BBj session.

Syntax

Return Value

Method

void

killSession(BBjSessionInfo SessionInfo, string username, string password)

Parameters

Variable

Description

SessionInfo

A BBjSessionInfo Object retrieved using BBjAPI::getSessionInfos().

username

Name of user executing this operation.

password

Password for user executing this operation.

Return Value

None.

Remarks

This call fails unless the username/password was previously authorized in BBj Enterprise Manager.

Example

api! = BBjAPI()

vector! = api!.getSessionInfos()
size = vector!.size()

if (size > 0) then
    info! = vector!.getItem(0)

    ?info!.getUser()
    ?info!.getUnresponsiveTime()
    ?info!.getIPAddress()
    ?info!.getConnectTime()
    ?info!.getProgramName()
    ?info!.getProgramLine()
    ?info!.isBackground()
    ?info!.getSessionID()
    ?info!.getTerminalID()
    ?info!
endif

for i = 0 to size-1
    info! = vector!.get(i)
    if info!.getProgramName() = "foo.bbj"
        api!.killSession(info!, "admin", "admin123")
    endif
next i

See Also

BBjAPI

BBjAPI::getSessionInfos

BBjSessionInfo

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