com.wrq.vhi.script.api
Interface ClientSession


public interface ClientSession

Provides information about the currently connected client.


Method Summary
 java.lang.String getAuthUsername()
          Gets the authenticated user name (if any) that is currently assigned to the session.
 int getClientSessionID()
          Gets the VHI client session ID.
 java.lang.Object getClientStateObject(java.lang.String name)
          Gets the object bound to the specified name in this client session, or null if no object is bound to the name.
 boolean isClientStateObject(java.lang.String name)
          Tests for the presence of a client state object bound to the specified name.
 void setClientStateObject(java.lang.String name, java.lang.Object object)
          Binds an object to this client session, using the name specified.
 

Method Detail

getClientSessionID

int getClientSessionID()
Gets the VHI client session ID. This is the ID that appears in the VHI log.

Returns:
client session ID.

getAuthUsername

java.lang.String getAuthUsername()
Gets the authenticated user name (if any) that is currently assigned to the session. This is not the same as any user name required to log in to the host application. (For that information check the model variables.) This parameter may be either null or an empty string if no client is currently connected or no credentials were used to connect to the server.

Returns:
user name authenticated to AADS

isClientStateObject

boolean isClientStateObject(java.lang.String name)
Tests for the presence of a client state object bound to the specified name.

Parameters:
name - the name of the object
Returns:
true if an object is bound to the specified name

getClientStateObject

java.lang.Object getClientStateObject(java.lang.String name)
Gets the object bound to the specified name in this client session, or null if no object is bound to the name.

Parameters:
name - the name of the object
Returns:
the object bound to the specified name or null if none

setClientStateObject

void setClientStateObject(java.lang.String name,
                          java.lang.Object object)
Binds an object to this client session, using the name specified. If an object of the same name is already bound to the session, the object is replaced.

Parameters:
name - the name to which to bind the object
object - the object to bind