Package com.sun.enterprise.security
Class UsernamePasswordStore
java.lang.Object
com.sun.enterprise.security.UsernamePasswordStore
This class is used to share information between either of the following scenarios 1. Different points of execution of a single
thread 2. Different threads that wish to share the username and password information
Which of the above two condition is applicable depends upon the system property key
"com.sun.appserv.iiopclient.perthreadauth"; When set to true, scenario #1 above applies and the username/password information
is not shared between threads. When set to false, scenario #2 above applies and the username/password information stored by
one thread is global and visible to all threads.
-
Method Summary
Modifier and TypeMethodDescriptionstatic char[]
Returns the password, that was previously stored.static String
Returns the username, that was previously stored.static void
reset()
Clears the username and password, that might have been previously stored, either globally or locally to each thread.static void
Clears the username and password only is they were stored locally to each threadstatic void
This method sets the username and password as thread-local or global variable
-
Method Details
-
set
This method sets the username and password as thread-local or global variable- Parameters:
username
-password
-
-
reset
public static void reset()Clears the username and password, that might have been previously stored, either globally or locally to each thread. -
resetThreadLocalOnly
public static void resetThreadLocalOnly()Clears the username and password only is they were stored locally to each thread -
getUsername
Returns the username, that was previously stored.- Returns:
- The username set previously or null if not set
-
getPassword
public static char[] getPassword()Returns the password, that was previously stored.- Returns:
- The password set previously or null if not set
-