APIdia Launch Partner
Top Description Constructors Methods
sun.security.util

public Class ConsoleCallbackHandler

extends Object
implements CallbackHandler
Class Inheritance
All Implemented Interfaces
javax.security.auth.callback.CallbackHandler
Imports
jdk.internal.util.StaticProperty, javax.security.auth.callback.Callback, .CallbackHandler, .ConfirmationCallback, .NameCallback, .PasswordCallback, .TextOutputCallback, .UnsupportedCallbackException, java.io.BufferedReader, .IOException, .InputStreamReader, java.nio.charset.Charset

A CallbackHandler that prompts and reads from the command line for answers to authentication questions.

Constructor Summary

AccessConstructor and Description
public
ConsoleCallbackHandler()

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

Method Summary

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

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

Handles the specified set of callbacks.

private String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ConsoleCallbackHandlerback to summary
public ConsoleCallbackHandler()

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

Method Detail

doConfirmationback to summary
private void doConfirmation(ConfirmationCallback confirmation) throws IOException, UnsupportedCallbackException
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
readLineback to summary
private String readLine() throws IOException