public class

TextOutputCallback

extends Object
implements Serializable Callback
java.lang.Object
   ↳ javax.security.auth.callback.TextOutputCallback

Class Overview

Underlying security services instantiate and pass a TextOutputCallback to the handle method of a CallbackHandler to display information messages, warning messages and error messages.

See Also

Summary

Constants
int ERROR Error message.
int INFORMATION Information message.
int WARNING Warning message.
Public Constructors
TextOutputCallback(int messageType, String message)
Construct a TextOutputCallback with a message type and message to be displayed.
Public Methods
String getMessage()
Get the message to be displayed.
int getMessageType()
Get the message type.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int ERROR

Error message.

Constant Value: 2 (0x00000002)

public static final int INFORMATION

Information message.

Constant Value: 0 (0x00000000)

public static final int WARNING

Warning message.

Constant Value: 1 (0x00000001)

Public Constructors

public TextOutputCallback (int messageType, String message)

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.

Public Methods

public String getMessage ()

Get the message to be displayed.

Returns
  • the message to be displayed.

public int getMessageType ()

Get the message type.

Returns
  • the message type (INFORMATION, WARNING or ERROR).