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 JoiningMessage extends SingleLineMessage {
30 private String account;
31 private String nick;
32
33 /***
34 * Creates a new instance of JoiningMessage
35 */
36 public JoiningMessage() {
37 }
38
39 /***
40 * Gets the messageCommand attribute of the JoiningMessage 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 JoiningMessage 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 strtok.nextToken();
82
83
84 strtok.nextToken();
85
86
87 strtok.nextToken();
88
89
90 account = strtok.nextToken();
91 nick = SpecialCharacters.getInstance().decode(strtok.nextToken(), true);
92
93 return this;
94 }
95 catch (Exception ex) {
96 throw new MessageFormatException(ex);
97 }
98 }
99
100
101
102
103 public void process(MsnConnection connection) {
104
105
106 }
107 }