org.jboss.security.auth.callback
Class ConsoleInputHandler

java.lang.Object
  extended byorg.jboss.security.auth.callback.ConsoleInputHandler
All Implemented Interfaces:
javax.security.auth.callback.CallbackHandler

public class ConsoleInputHandler
extends java.lang.Object
implements javax.security.auth.callback.CallbackHandler

An implementation of CallbackHandler that obtains the values for NameCallback and PasswordCallback from the console.

See Also:
CallbackHandler, handle(Callback[])

Constructor Summary
ConsoleInputHandler()
           
 
Method Summary
 void handle(javax.security.auth.callback.Callback[] callbacks)
          Sets any NameCallback name property to the instance username, sets any PasswordCallback password property to the instance, and any password.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsoleInputHandler

public ConsoleInputHandler()
Method Detail

handle

public void handle(javax.security.auth.callback.Callback[] callbacks)
            throws javax.security.auth.callback.UnsupportedCallbackException
Sets any NameCallback name property to the instance username, sets any PasswordCallback password property to the instance, and any password.

Specified by:
handle in interface javax.security.auth.callback.CallbackHandler
Throws:
UnsupportedCallbackException, - thrown if any callback of type other than NameCallback or PasswordCallback are seen.
javax.security.auth.callback.UnsupportedCallbackException