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 * Description of the Class
28 *
29 *@author christoph
30 */
31 public class OnlineMessage extends SingleLineMessage {
32 private String status;
33 private String account;
34 private String nick;
35
36 /***
37 * Constructor for the OnlineMessage object
38 */
39 public OnlineMessage() {
40 }
41
42 /***
43 * Gets the messageCommand attribute of the OnlineMessage object
44 *
45 *@return The messageCommand value
46 */
47 public String getMessageCommand() {
48 return MsnMessageFactory.CMD_ONLINE;
49 }
50
51 /***
52 * Getter for property status.
53 *
54 *@return Value of property status.
55 */
56 public java.lang.String getStatus() {
57 return status;
58 }
59
60 /***
61 * Getter for property account.
62 *
63 *@return Value of property account.
64 */
65 public java.lang.String getAccount() {
66 return account;
67 }
68
69 /***
70 * Getter for property nick.
71 *
72 *@return Value of property nick.
73 */
74 public java.lang.String getNick() {
75 return nick;
76 }
77
78 /***
79 * Adds a feature to the Line attribute of the OnlineMessage object
80 *
81 *@param line The feature to be added to the Line attribute
82 *@return Description of the Return Value
83 */
84 public MsnMessage addLine(String line) {
85 StringTokenizer st = new StringTokenizer(line);
86
87 st.nextToken();
88
89 status = st.nextToken();
90
91 account = st.nextToken();
92
93 nick = SpecialCharacters.getInstance().decode(st.nextToken(), true);
94
95 return this;
96 }
97
98
99
100
101 public void process(MsnConnection connection) {
102
103
104 }
105 }