docmain.css" /> Session - Reflection ZFE 2.1

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 8-17 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 connected available device name, the configured device name, or null if no device name is configured.

The connected device name is the name agreed upon during the connection negotiation process between the host and the terminal. It may be what is specified, or it could possibly be different, if for example a device name pool was specified.

Returns

{String}The connected device name, the configured device name, or null.

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 Operator Information Area (OIA) instance for this session.

Returns

{OIA} Associated with this session