1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package net.sf.dexterim.msn.message;
20
21 import java.util.StringTokenizer;
22
23 import net.sf.dexterim.msn.MsnConnection;
24 import net.sf.dexterim.msn.util.SpecialCharacters;
25
26 /***
27 *@author christoph
28 */
29 public class JoinMessage extends SingleLineMessage {
30 private String account;
31 private String nick;
32
33 /***
34 * Creates a new instance of JoinMessage
35 */
36 public JoinMessage() {
37 }
38
39 /***
40 * Gets the messageCommand attribute of the JoinMessage object
41 *
42 *@return The messageCommand value
43 */
44 public String getMessageCommand() {
45 return "";
46 }
47
48 /***
49 * Getter for property account.
50 *
51 *@return Value of property account.
52 */
53 public java.lang.String getAccount() {
54 return account;
55 }
56
57 /***
58 * Getter for property nick.
59 *
60 *@return Value of property nick.
61 */
62 public java.lang.String getNick() {
63 return nick;
64 }
65
66 /***
67 * Adds a feature to the Line attribute of the JoinMessage object
68 *
69 *@param line The feature to be added to the Line
70 * attribute
71 *@return Description of the Return Value
72 *@exception MessageFormatException Description of the Exception
73 */
74 public MsnMessage addLine(String line) throws MessageFormatException {
75 try {
76 StringTokenizer strtok = new StringTokenizer(line);
77
78 strtok.nextToken();
79
80
81 account = strtok.nextToken();
82 nick = SpecialCharacters.getInstance().decode(strtok.nextToken(), true);
83
84 return this;
85 }
86 catch (Exception ex) {
87 throw new MessageFormatException(ex);
88 }
89 }
90
91
92
93
94 public void process(MsnConnection connection) {
95
96
97 }
98 }