For the latest news and information visit
The GNU Crypto project

gnu.crypto.auth.callback
Class AbstractCallbackHandler

java.lang.Object
  extended by gnu.crypto.auth.callback.AbstractCallbackHandler
All Implemented Interfaces:
CallbackHandler
Direct Known Subclasses:
AWTCallbackHandler, ConsoleCallbackHandler, DefaultCallbackHandler, SWTCallbackHandler

public abstract class AbstractCallbackHandler
extends Object
implements CallbackHandler


Field Summary
protected  ResourceBundle messages
           
 
Constructor Summary
protected AbstractCallbackHandler()
           
 
Method Summary
static CallbackHandler getInstance(String type)
           
static CallbackHandler getInstance(String type, Provider provider)
           
static CallbackHandler getInstance(String type, String provider)
           
 void handle(Callback[] callbacks)
           
protected abstract  void handleChoice(ChoiceCallback callback)
          Handles a ChoiceCallback.
protected abstract  void handleConfirmation(ConfirmationCallback callback)
          Handles a ConfirmationCallback.
protected abstract  void handleLanguage(LanguageCallback callback)
          Handles a LanguageCallback.
protected abstract  void handleName(NameCallback callback)
          Handles a NameCallback.
protected  void handleOther(Callback callback)
          Handles an unknown callback.
protected abstract  void handlePassword(PasswordCallback callback)
          Handles a PasswordCallback.
protected abstract  void handleTextInput(TextInputCallback callback)
          Handles a TextInputCallback.
protected abstract  void handleTextOutput(TextOutputCallback callback)
          Handles a TextOutputCallback.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

messages

protected final ResourceBundle messages
Constructor Detail

AbstractCallbackHandler

protected AbstractCallbackHandler()
Method Detail

getInstance

public static CallbackHandler getInstance(String type)
                                   throws NoSuchAlgorithmException
Throws:
NoSuchAlgorithmException

getInstance

public static CallbackHandler getInstance(String type,
                                          String provider)
                                   throws NoSuchAlgorithmException,
                                          NoSuchProviderException
Throws:
NoSuchAlgorithmException
NoSuchProviderException

getInstance

public static CallbackHandler getInstance(String type,
                                          Provider provider)
                                   throws NoSuchAlgorithmException
Throws:
NoSuchAlgorithmException

handle

public void handle(Callback[] callbacks)
            throws IOException,
                   UnsupportedCallbackException
Specified by:
handle in interface CallbackHandler
Throws:
IOException
UnsupportedCallbackException

handleChoice

protected abstract void handleChoice(ChoiceCallback callback)
                              throws IOException
Handles a ChoiceCallback.

Parameters:
callback - The choice callback.
Throws:
IOException - If an I/O error occurs.

handleConfirmation

protected abstract void handleConfirmation(ConfirmationCallback callback)
                                    throws IOException
Handles a ConfirmationCallback.

Parameters:
callback - The confirmation callback.
Throws:
IOException - If an I/O error occurs.

handleLanguage

protected abstract void handleLanguage(LanguageCallback callback)
                                throws IOException
Handles a LanguageCallback.

Parameters:
callback - The language callback.
Throws:
IOException - If an I/O error occurs.

handleName

protected abstract void handleName(NameCallback callback)
                            throws IOException
Handles a NameCallback.

Parameters:
callback - The name callback.
Throws:
IOException - If an I/O error occurs.

handlePassword

protected abstract void handlePassword(PasswordCallback callback)
                                throws IOException
Handles a PasswordCallback.

Parameters:
callback - The password callback.
Throws:
IOException - If an I/O error occurs.

handleTextInput

protected abstract void handleTextInput(TextInputCallback callback)
                                 throws IOException
Handles a TextInputCallback.

Parameters:
callback - The text input callback.
Throws:
IOException - If an I/O error occurs.

handleTextOutput

protected abstract void handleTextOutput(TextOutputCallback callback)
                                  throws IOException
Handles a TextOutputCallback.

Parameters:
callback - The text output callback.
Throws:
IOException - If an I/O error occurs.

handleOther

protected void handleOther(Callback callback)
                    throws IOException,
                           UnsupportedCallbackException
Handles an unknown callback. The default implementation simply throws an UnsupportedCallbackException.

Parameters:
callback - The callback to handle.
Throws:
IOException - If an I/O error occurs.
UnsupportedCallbackException - If the specified callback is not supported.

For the latest news and information visit
The GNU Crypto project

Copyright © 2001, 2002, 2003 Free Software Foundation, Inc. All Rights Reserved.