Name

TextOutputCallback

Synopsis

A Callback of this type represents a request to display text to the user. A callback handler should call getMessage( ) and display the returned string to the user. It should also call getMessageType( ) and use the returned value (which is one of the constants defined by the class) to indicate the type or severity of the information.

javax.security.auth.callback.TextOutputCallback

Figure 19-12. javax.security.auth.callback.TextOutputCallback

public class TextOutputCallback implements Callback, Serializable {
// Public Constructors
     public TextOutputCallback(int messageType, String message);  
// Public Constants
     public static final int ERROR;                                      =2
     public static final int INFORMATION;                                =0
     public static final int WARNING;                                    =1
                  // Public Instance Methods
     public String getMessage( );  
     public int getMessageType( );  
}

Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.