gnu.crypto.auth.callback

Class AbstractCallbackHandler

Implemented Interfaces:
CallbackHandler
Known Direct Subclasses:
AWTCallbackHandler, ConsoleCallbackHandler, DefaultCallbackHandler, SWTCallbackHandler

public abstract class AbstractCallbackHandler
extends Object
implements CallbackHandler

Field Summary

protected ResourceBundle
messages

Constructor Summary

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.

Field Details

messages

protected final ResourceBundle messages

Constructor Details

AbstractCallbackHandler

protected AbstractCallbackHandler()

Method Details

getInstance

public static CallbackHandler getInstance(String type)
            throws NoSuchAlgorithmException

getInstance

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

getInstance

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

handle

public void handle(Callback[] callbacks)
            throws IOException,
                   UnsupportedCallbackException

handleChoice

protected abstract void handleChoice(ChoiceCallback callback)
            throws IOException
Handles a ChoiceCallback.
Parameters:
callback - The choice callback.

handleConfirmation

protected abstract void handleConfirmation(ConfirmationCallback callback)
            throws IOException
Handles a ConfirmationCallback.
Parameters:
callback - The confirmation callback.

handleLanguage

protected abstract void handleLanguage(LanguageCallback callback)
            throws IOException
Handles a LanguageCallback.
Parameters:
callback - The language callback.

handleName

protected abstract void handleName(NameCallback callback)
            throws IOException
Handles a NameCallback.
Parameters:
callback - The name callback.

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.

handlePassword

protected abstract void handlePassword(PasswordCallback callback)
            throws IOException
Handles a PasswordCallback.
Parameters:
callback - The password callback.

handleTextInput

protected abstract void handleTextInput(TextInputCallback callback)
            throws IOException
Handles a TextInputCallback.
Parameters:
callback - The text input callback.

handleTextOutput

protected abstract void handleTextOutput(TextOutputCallback callback)
            throws IOException
Handles a TextOutputCallback.
Parameters:
callback - The text output callback.

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