javax.security.auth.callback

Class TextOutputCallback

  1. java.lang.Object
  2. extended byjavax.security.auth.callback.TextOutputCallback
All implemented interfaces:
java.io.Serializable, Callback

  1. public class TextOutputCallback
  2. extends java.lang.Object
  3. implements Callback, java.io.Serializable

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:
CallbackHandler, Serialized Form

Field Summary

Modifier and Type Field and Description
  1. static
  2. int
ERROR
Error message.
  1. static
  2. int
INFORMATION
Information message.
  1. static
  2. int
WARNING
Warning message.

Constructor Summary

Constructor and Description
TextOutputCallback(int messageType,java.lang.String message)
Construct a TextOutputCallback with a message type and message to be displayed.

Method Summary

Modifier and Type Method and Description
  1. java.lang.String
getMessage()
Get the message to be displayed.
  1. int
getMessageType()
Get the message type.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

INFORMATION

  1. public static final int INFORMATION
Information message.
See Also:

WARNING

  1. public static final int WARNING
Warning message.
See Also:

ERROR

  1. public static final int ERROR
Error message.
See Also:

Constructor Detail

TextOutputCallback

  1. public TextOutputCallback(int messageType,
  2. java.lang.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:
java.lang.IllegalArgumentException - if messageType is not either INFORMATION, WARNING or ERROR, if message is null, or if message has a length of 0.

Method Detail

getMessageType

  1. public int getMessageType()
Get the message type.

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

getMessage

  1. public java.lang.String getMessage( )
Get the message to be displayed.

Returns:
the message to be displayed.