javax.security.auth.callback
Class TextOutputCallback
- java.lang.Object
-
- javax.security.auth.callback.TextOutputCallback
-
- All Implemented Interfaces:
- java.io.Serializable, Callback
public class TextOutputCallback extends java.lang.Object implements Callback, java.io.Serializable
Underlying security services instantiate and pass a
TextOutputCallbackto thehandlemethod of aCallbackHandlerto display information messages, warning messages and error messages.- See Also:
CallbackHandler, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static intERRORError message.static intINFORMATIONInformation message.static intWARNINGWarning message.
-
Constructor Summary
Constructors Constructor and Description TextOutputCallback(int messageType, java.lang.String message)Construct a TextOutputCallback with a message type and message to be displayed.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.StringgetMessage()Get the message to be displayed.intgetMessageType()Get the message type.
-
-
-
Field Detail
-
INFORMATION
public static final int INFORMATION
Information message.- See Also:
- Constant Field Values
-
WARNING
public static final int WARNING
Warning message.- See Also:
- Constant Field Values
-
ERROR
public static final int ERROR
Error message.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TextOutputCallback
public TextOutputCallback(int messageType, java.lang.String message)Construct a TextOutputCallback with a message type and message to be displayed.- Parameters:
messageType- the message type (INFORMATION,WARNINGorERROR).message- the message to be displayed.- Throws:
java.lang.IllegalArgumentException- ifmessageTypeis not eitherINFORMATION,WARNINGorERROR, ifmessageis null, or ifmessagehas a length of 0.
-
-