1 package ch.odi.pam;
2
3 /**
4 * A message to show to the user. Instances of this class are immutable.
5 *
6 * @author Ortwin Gl?ck
7 */
8 public class PamMessage {
9 private int msg_style;
10 private String msg;
11
12 public PamMessage(int msg_style, String msg) {
13 this.msg_style = msg_style;
14 this.msg = msg;
15 }
16
17 /**
18 * Gets the message string.
19 * @return the message
20 */
21 public String getMsg() {
22 return msg;
23 }
24
25 /**
26 * Determines what to do with the message.
27 *
28 * @return one of the constants
29 * PAM_PROMPT_ECHO_OFF
30 * Obtain a string without echoing any text
31 *
32 * PAM_PROMPT_ECHO_ON
33 * Obtain a string whilst echoing text
34 *
35 * PAM_ERROR_MSG
36 * Display an error
37 *
38 * PAM_TEXT_INFO
39 * Display some text.
40 */
41 public int getMsg_style() {
42 return msg_style;
43 }
44 }