|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.opends.server.api.DirectoryThread
org.opends.server.util.PasswordReader
@PublicAPI(stability=UNCOMMITTED, mayInstantiate=false, mayExtend=false, mayInvoke=true) public final class PasswordReader
This class provides a means of interactively reading a password from the command-line without echoing it to the console. If it is running on a Java 6 or higher VM, then it will use the System.console() method. If it is running on Java 5, then it will use an ugly hack in which one thread will be used to repeatedly send backspace characters to the console while another reads the password. Reflection is used to determine whether the Java 6 method is available and to invoke it if it is so that the code will still compile cleanly on Java 5 systems.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Method Summary | |
---|---|
static char[] |
readPassword()
Reads a password from the console without echoing it to the client. |
void |
run()
Operates in a loop, sending backspace characters to the console to attempt to prevent exposing what the user entered. |
Methods inherited from class org.opends.server.api.DirectoryThread |
---|
getAssociatedTask, getCreationStackTrace, getDebugProperties, getParentThread, setAssociatedTask |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
@PublicAPI(stability=PRIVATE, mayInstantiate=false, mayExtend=false, mayInvoke=false) public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public static char[] readPassword()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |