Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
gnu.javax.security.auth.callback.AbstractCallbackHandler
Field Summary | |
protected ResourceBundle |
Constructor Summary | |
Method Summary | |
static CallbackHandler |
|
static CallbackHandler |
|
static CallbackHandler |
|
String |
|
void | |
protected abstract void |
|
protected abstract void |
|
protected abstract void |
|
protected abstract void |
|
protected void |
|
protected abstract void |
|
protected abstract void |
|
protected abstract void |
|
Methods inherited from class java.lang.Object | |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
public static CallbackHandler getInstance(String type) throws NoSuchAlgorithmException
Create an instance ofCallbackHandler
of the designatedtype
from the first Security Provider which offers it.
- Parameters:
type
- the type of callback handler to create.
- Returns:
- a newly created instance of
ClassbackHandler
.
- Throws:
NoSuchAlgorithmException
- if no security provider is found to offer an implementation ofCallbackHandler
of the designatedtype
.
public static CallbackHandler getInstance(String type, String provider) throws NoSuchAlgorithmException, NoSuchProviderException
Create an instance ofCallbackHandler
of the designatedtype
from the named securityprovider
.
- Parameters:
type
- the type of callback handler to create.provider
- a named security provider to use.
- Returns:
- a newly created instance of
ClassbackHandler
.
- Throws:
NoSuchAlgorithmException
- if no security provider is found to offer an implementation ofCallbackHandler
of the designatedtype
.IllegalArgumentException
- if eithertype
orprovider
isnull
, or iftype
is an empty string.
public static CallbackHandler getInstance(String type, Provider provider) throws NoSuchAlgorithmException
Create an instance ofCallbackHandler
of the designatedtype
from the designated securityprovider
.
- Parameters:
type
- the type of callback handler to create.provider
- a security provider to use.
- Returns:
- a newly created instance of
ClassbackHandler
.
- Throws:
NoSuchAlgorithmException
- if no security provider is found to offer an implementation ofCallbackHandler
of the designatedtype
.IllegalArgumentException
- if eithertype
orprovider
isnull
, or iftype
is an empty string.
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
- Specified by:
- handle in interface CallbackHandler
protected abstract void handleChoice(ChoiceCallback callback) throws IOException
Handles aChoiceCallback
.
- Parameters:
callback
- The choice callback.
- Throws:
IOException
- If an I/O error occurs.
protected abstract void handleConfirmation(ConfirmationCallback callback) throws IOException
Handles aConfirmationCallback
.
- Parameters:
callback
- The confirmation callback.
- Throws:
IOException
- If an I/O error occurs.
protected abstract void handleLanguage(LanguageCallback callback) throws IOException
Handles aLanguageCallback
.
- Parameters:
callback
- The language callback.
- Throws:
IOException
- If an I/O error occurs.
protected abstract void handleName(NameCallback callback) throws IOException
Handles aNameCallback
.
- Parameters:
callback
- The name callback.
- Throws:
IOException
- If an I/O error occurs.
protected void handleOther(Callback callback) throws IOException, UnsupportedCallbackException
Handles an unknown callback. The default implementation simply throws anUnsupportedCallbackException
.
- Parameters:
callback
- The callback to handle.
- Throws:
IOException
- If an I/O error occurs.UnsupportedCallbackException
- If the specified callback is not supported.
protected abstract void handlePassword(PasswordCallback callback) throws IOException
Handles aPasswordCallback
.
- Parameters:
callback
- The password callback.
- Throws:
IOException
- If an I/O error occurs.
protected abstract void handleTextInput(TextInputCallback callback) throws IOException
Handles aTextInputCallback
.
- Parameters:
callback
- The text input callback.
- Throws:
IOException
- If an I/O error occurs.
protected abstract void handleTextOutput(TextOutputCallback callback) throws IOException
Handles aTextOutputCallback
.
- Parameters:
callback
- The text output callback.
- Throws:
IOException
- If an I/O error occurs.