org.openorb.orb.csiv2
Class CSIClientContext

java.lang.Object
  extended by org.openorb.orb.csiv2.CSIClientContext

public final class CSIClientContext
extends java.lang.Object

This class provides methods that are called in the context of a client-side request.

Author:
Michael Rumpf

Method Summary
static java.lang.String getUserIdentity()
          Return the identity of the current user.
static java.lang.String getUserName()
          Return the name of the current user.
static char[] getUserPassword()
          Return the password of the current user.
static void setDefaultIdentity(java.lang.String id)
          Set the default user's identity.
static void setDefaultUser(java.lang.String name, java.lang.String pwd)
          Set the default user that is to be used when no thread-local user has been set.
static void setUser(java.lang.String name, java.lang.String pwd)
          Set the thread-local user.
static void setUserIdentity(java.lang.String name, java.lang.String id)
          Set the thread-local user's identity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setDefaultUser

public static void setDefaultUser(java.lang.String name,
                                  java.lang.String pwd)
Set the default user that is to be used when no thread-local user has been set.

Parameters:
name - The name of the default user.
pwd - The password of the default user.

setDefaultIdentity

public static void setDefaultIdentity(java.lang.String id)
Set the default user's identity.

Parameters:
id - The identity of the default user.

setUser

public static void setUser(java.lang.String name,
                           java.lang.String pwd)
Set the thread-local user.

Parameters:
name - The name of the user.
pwd - The password of the user.

setUserIdentity

public static void setUserIdentity(java.lang.String name,
                                   java.lang.String id)
Set the thread-local user's identity.

Parameters:
name - The name of the user.
id - The identity of the user.

getUserName

public static java.lang.String getUserName()
Return the name of the current user. This returns either the name of the user associated with the current thread or the name of the default user.

Returns:
The user's name.

getUserPassword

public static char[] getUserPassword()
Return the password of the current user. This returns either the password of the user associated with the current thread or the password of the default user.

Returns:
The user's password.

getUserIdentity

public static java.lang.String getUserIdentity()
Return the identity of the current user. This returns either the identity of the user associated with the current thread or the identity of the default user.

Returns:
The user's identity.