javax.security.auth.callback
public class TextOutputCallback extends Object implements Callback, Serializable
Underlying security services instantiate and pass a
TextOutputCallback to the handle() method of a
{@link CallbackHandler} to display information messages, warning messages and
error messages.
See Also: CallbackHandler
| Field Summary | |
|---|---|
| static int | ERROR Error message |
| static int | INFORMATION Information message |
| static int | WARNING Warning message |
| Constructor Summary | |
|---|---|
| TextOutputCallback(int messageType, String message) Construct a | |
| Method Summary | |
|---|---|
| String | getMessage() Returns the |
| int | getMessageType() Returns the message's |
Construct a TextOutputCallback with a message type and
message to be displayed.
Parameters: messageType the message type (INFORMATION, WARNING or ERROR). message the message to be displayed.
Throws: IllegalArgumentException if messageType is not either
INFORMATION, WARNING or ERROR, if
message is null, or if message has
a length of 0.
Returns the message to be displayed.
Returns: the message to be displayed.
Returns the message's messageType.
Returns: the message type (INFORMATION, WARNING or ERROR).