1 7 8 package javax.security.auth.callback; 9 10 19 public class TextOutputCallback implements Callback , java.io.Serializable { 20 21 private static final long serialVersionUID = 1689502495511663102L; 22 23 24 public static final int INFORMATION = 0; 25 26 public static final int WARNING = 1; 27 28 public static final int ERROR = 2; 29 30 34 private int messageType; 35 39 private String message; 40 41 58 public TextOutputCallback(int messageType, String message) { 59 if ((messageType != INFORMATION && 60 messageType != WARNING && messageType != ERROR) || 61 message == null || message.length() == 0) 62 throw new IllegalArgumentException (); 63 64 this.messageType = messageType; 65 this.message = message; 66 } 67 68 76 public int getMessageType() { 77 return messageType; 78 } 79 80 87 public String getMessage() { 88 return message; 89 } 90 } 91 | Popular Tags |