org.openmdx.security.auth.client.spi
Class TerminalCallbackHandler

java.lang.Object
  extended by org.openmdx.security.auth.callback.AbstractCallbackHandler
      extended by org.openmdx.security.auth.client.spi.TerminalCallbackHandler
All Implemented Interfaces:
CallbackHandler

public class TerminalCallbackHandler
extends AbstractCallbackHandler

Call-back Handler for Console I/O


Field Summary
protected  BufferedReader reader
          To accept the console input
 
Constructor Summary
TerminalCallbackHandler()
          Constructor
 
Method Summary
protected  String accept(String prompt, String defaultValue)
          Accept an single value
 void handle(Callback[] callbacks)
          Handle all callbacks
protected  void handle(NameCallback callback)
          Handle a given callback class
protected  void handle(PasswordCallback callback)
          Handle a given callback class
protected  void handle(TextInputCallback callback)
          Handle a given callback class
protected  void handle(TextOutputCallback callback)
          Handle a given callback class
 
Methods inherited from class org.openmdx.security.auth.callback.AbstractCallbackHandler
handle, handle, handle, handle, handle, unsupported
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

reader

protected final BufferedReader reader
To accept the console input

Constructor Detail

TerminalCallbackHandler

public TerminalCallbackHandler()
Constructor

Method Detail

accept

protected String accept(String prompt,
                        String defaultValue)
                 throws IOException
Accept an single value

Parameters:
prompt -
defaultValue -
Returns:
the given value; or null
Throws:
IOException

handle

protected void handle(NameCallback callback)
               throws UnsupportedCallbackException,
                      IOException
Description copied from class: AbstractCallbackHandler
Handle a given callback class

Overrides:
handle in class AbstractCallbackHandler
Parameters:
callback - the callback object to be handled
Throws:
UnsupportedCallbackException - if the given callback class is not supported
IOException - if callback handling fails

handle

protected void handle(PasswordCallback callback)
               throws UnsupportedCallbackException,
                      IOException
Description copied from class: AbstractCallbackHandler
Handle a given callback class

Overrides:
handle in class AbstractCallbackHandler
Parameters:
callback - the callback object to be handled
Throws:
UnsupportedCallbackException - if the given callback class is not supported
IOException - if callback handling fails

handle

protected void handle(TextInputCallback callback)
               throws IOException,
                      UnsupportedCallbackException
Description copied from class: AbstractCallbackHandler
Handle a given callback class

Overrides:
handle in class AbstractCallbackHandler
Parameters:
callback - the callback object to be handled
Throws:
IOException - if callback handling fails
UnsupportedCallbackException - if the given callback class is not supported

handle

protected void handle(TextOutputCallback callback)
               throws IOException,
                      UnsupportedCallbackException
Description copied from class: AbstractCallbackHandler
Handle a given callback class

Overrides:
handle in class AbstractCallbackHandler
Parameters:
callback - the callback object to be handled
Throws:
IOException - if callback handling fails
UnsupportedCallbackException - if the given callback class is not supported

handle

public void handle(Callback[] callbacks)
            throws IOException,
                   UnsupportedCallbackException
Description copied from class: AbstractCallbackHandler
Handle all callbacks

Specified by:
handle in interface CallbackHandler
Overrides:
handle in class AbstractCallbackHandler
Parameters:
callbacks - the callbacks to be handled
Throws:
IOException
UnsupportedCallbackException


This software is published under the BSD license. Copyright © 2003-2008, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.