Session

The session object is the main entry point for interacting with the host. It contains functions for connecting, disconnecting, and obtaining the PresentationSpace object.

Table 5-32 Session object functions

METHODS

connect()

Connects to the configured host. If needed, use wait.forConnect() to block macro execution until the session is connected.

Returns

None

disconnect()

Disconnects from the configured host. If needed, use wait.forDisconnect() to block macro execution until the session is connected.

Returns

None

isConnected()

Determines whether the connection to the host is connected.

Returns

{Boolean} true if host connection is established; false if not

getPresentationSpace()

Provides access to the PresentationSpace instance for this session.

Returns

{PresentationSpace} instance associated with this session.

getDeviceName()

Returns the device name for a connected session or an empty string if the session is disconnected or doesn't have device name.

Returns

{String}The connected device name.

getType()

Returns the type of host session. See SessionType.

Returns

{String} The type of host session.

setDeviceName()

Provides a means to modify the device name on a session instance.

Parameters

{String} name Device name to use when connecting to a host.

Throws

{Error} If an attempt is made to set the device name while the session is connected.

getOIA()

Provides access to the OIA instance for this session.

Returns

{OIA} Associated with this session