APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.security.auth.callback

public Class TextCallbackHandler

extends Object
implements CallbackHandler
Class Inheritance
All Implemented Interfaces
javax.security.auth.callback.CallbackHandler
Imports
javax.security.auth.callback.Callback, .CallbackHandler, .NameCallback, .PasswordCallback, .UnsupportedCallbackException, java.io.IOException, sun.security.util.ConsoleCallbackHandler

Prompts and reads from the command line for answers to authentication questions. This can be used by a JAAS application to instantiate a CallbackHandler
Since
1.4
See Also
javax.security.auth.callback

Field Summary

Modifier and TypeField and Description
private final CallbackHandler

Constructor Summary

AccessConstructor and Description
public
TextCallbackHandler()

Creates a callback handler that prompts and reads from the command line for answers to authentication questions.

Method Summary

Modifier and TypeMethod and Description
public void
handle(Callback[]
the callbacks to handle
callbacks
)

Implements javax.security.auth.callback.CallbackHandler.handle.

Handles the specified set of callbacks.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

consoleHandlerback to summary
private final CallbackHandler consoleHandler

Constructor Detail

TextCallbackHandlerback to summary
public TextCallbackHandler()

Creates a callback handler that prompts and reads from the command line for answers to authentication questions. This can be used by JAAS applications to instantiate a CallbackHandler.

Method Detail

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

Implements javax.security.auth.callback.CallbackHandler.handle.

Handles the specified set of callbacks.

Parameters
callbacks:Callback[]

the callbacks to handle

Exceptions
IOException:
if an input or output error occurs.
UnsupportedCallbackException:
if the callback is not an instance of NameCallback or PasswordCallback