gnu.crypto.auth.callback

Class AbstractCallbackHandler

public abstract class AbstractCallbackHandler extends Object implements CallbackHandler

Field Summary
protected ResourceBundlemessages
Constructor Summary
protected AbstractCallbackHandler()
Method Summary
static CallbackHandlergetInstance(String type)
static CallbackHandlergetInstance(String type, String provider)
static CallbackHandlergetInstance(String type, Provider provider)
voidhandle(Callback[] callbacks)
protected abstract voidhandleChoice(ChoiceCallback callback)
Handles a ChoiceCallback.
protected abstract voidhandleConfirmation(ConfirmationCallback callback)
Handles a ConfirmationCallback.
protected abstract voidhandleLanguage(LanguageCallback callback)
Handles a LanguageCallback.
protected abstract voidhandleName(NameCallback callback)
Handles a NameCallback.
protected voidhandleOther(Callback callback)
Handles an unknown callback.
protected abstract voidhandlePassword(PasswordCallback callback)
Handles a PasswordCallback.
protected abstract voidhandleTextInput(TextInputCallback callback)
Handles a TextInputCallback.
protected abstract voidhandleTextOutput(TextOutputCallback callback)
Handles a TextOutputCallback.

Field Detail

messages

protected final ResourceBundle messages

Constructor Detail

AbstractCallbackHandler

protected AbstractCallbackHandler()

Method Detail

getInstance

public static CallbackHandler getInstance(String type)

getInstance

public static CallbackHandler getInstance(String type, String provider)

getInstance

public static CallbackHandler getInstance(String type, Provider provider)

handle

public void handle(Callback[] callbacks)

handleChoice

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

Parameters: callback The choice callback.

Throws: IOException If an I/O error occurs.

handleConfirmation

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

Parameters: callback The confirmation callback.

Throws: IOException If an I/O error occurs.

handleLanguage

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

Parameters: callback The language callback.

Throws: IOException If an I/O error occurs.

handleName

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

Parameters: callback The name callback.

Throws: IOException If an I/O error occurs.

handleOther

protected void handleOther(Callback callback)
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.

handlePassword

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

Parameters: callback The password callback.

Throws: IOException If an I/O error occurs.

handleTextInput

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

Parameters: callback The text input callback.

Throws: IOException If an I/O error occurs.

handleTextOutput

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

Parameters: callback The text output callback.

Throws: IOException If an I/O error occurs.

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