javax.security.auth.callback
Class TextOutputCallback

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.security.auth.callback.TextOutputCallback
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Callback sample code for javax.security.auth.callback.Callback definition code for javax.security.auth.callback.Callback

public class TextOutputCallback
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements Callback sample code for javax.security.auth.callback.Callback definition code for javax.security.auth.callback.Callback , Serializable sample code for java.io.Serializable definition code for 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 sample code for javax.security.auth.callback.CallbackHandler definition code for javax.security.auth.callback.CallbackHandler , Serialized Form

Field Summary
static int ERROR sample code for javax.security.auth.callback.TextOutputCallback.ERROR definition code for javax.security.auth.callback.TextOutputCallback.ERROR
          Error message.
static int INFORMATION sample code for javax.security.auth.callback.TextOutputCallback.INFORMATION definition code for javax.security.auth.callback.TextOutputCallback.INFORMATION
          Information message.
static int WARNING sample code for javax.security.auth.callback.TextOutputCallback.WARNING definition code for javax.security.auth.callback.TextOutputCallback.WARNING
          Warning message.
 
Constructor Summary
TextOutputCallback sample code for javax.security.auth.callback.TextOutputCallback.TextOutputCallback(int, java.lang.String) definition code for javax.security.auth.callback.TextOutputCallback.TextOutputCallback(int, java.lang.String) (int messageType, String sample code for java.lang.String definition code for java.lang.String  message)
          Construct a TextOutputCallback with a message type and message to be displayed.
 
Method Summary
 String sample code for java.lang.String definition code for java.lang.String getMessage sample code for javax.security.auth.callback.TextOutputCallback.getMessage() definition code for javax.security.auth.callback.TextOutputCallback.getMessage() ()
          Get the message to be displayed.
 int getMessageType sample code for javax.security.auth.callback.TextOutputCallback.getMessageType() definition code for javax.security.auth.callback.TextOutputCallback.getMessageType() ()
          Get the message type.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

INFORMATION sample code for javax.security.auth.callback.TextOutputCallback.INFORMATION

public static final int INFORMATION
Information message.

See Also:
Constant Field Values

WARNING sample code for javax.security.auth.callback.TextOutputCallback.WARNING

public static final int WARNING
Warning message.

See Also:
Constant Field Values

ERROR sample code for javax.security.auth.callback.TextOutputCallback.ERROR

public static final int ERROR
Error message.

See Also:
Constant Field Values
Constructor Detail

TextOutputCallback sample code for javax.security.auth.callback.TextOutputCallback(int, java.lang.String) definition code for javax.security.auth.callback.TextOutputCallback(int, java.lang.String)

public TextOutputCallback(int messageType,
                          String sample code for java.lang.String definition code for 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:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for 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 sample code for javax.security.auth.callback.TextOutputCallback.getMessageType() definition code for javax.security.auth.callback.TextOutputCallback.getMessageType()

public int getMessageType()
Get the message type.

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

getMessage sample code for javax.security.auth.callback.TextOutputCallback.getMessage() definition code for javax.security.auth.callback.TextOutputCallback.getMessage()

public String sample code for java.lang.String definition code for java.lang.String  getMessage()
Get the message to be displayed.

Returns:
the message to be displayed.