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
22 import java.util.StringTokenizer;
23
24 import net.sf.dexterim.msn.MsnConnection;
25
26 /***
27 * Description of the Class
28 *
29 *@author christoph
30 */
31 public class StartConversationMessage extends SingleLineMessage {
32 private String account;
33 private String switchBoardCKI;
34 private String conversationID;
35 private String switchBoardIP;
36 private int switchBoardPort;
37
38 /***
39 * Constructor for the StartConversationMessage object
40 */
41 public StartConversationMessage() {
42 }
43
44 /***
45 * Gets the messageCommand attribute of the StartConversationMessage object
46 *
47 *@return The messageCommand value
48 */
49 public String getMessageCommand() {
50 return MsnMessageFactory.CMD_RING;
51 }
52
53 /***
54 * Getter for property account.
55 *
56 *@return Value of property account.
57 */
58 public java.lang.String getAccount() {
59 return account;
60 }
61
62 /***
63 * Getter for property switchBoardCKI.
64 *
65 *@return Value of property switchBoardCKI.
66 */
67 public java.lang.String getSwitchBoardCKI() {
68 return switchBoardCKI;
69 }
70
71 /***
72 * Getter for property conversationID.
73 *
74 *@return Value of property conversationID.
75 */
76 public java.lang.String getConversationID() {
77 return conversationID;
78 }
79
80 /***
81 * Getter for property switchBoardIP.
82 *
83 *@return Value of property switchBoardIP.
84 */
85 public java.lang.String getSwitchBoardIP() {
86 return switchBoardIP;
87 }
88
89 /***
90 * Getter for property switchBoardPort.
91 *
92 *@return Value of property switchBoardPort.
93 */
94 public int getSwitchBoardPort() {
95 return switchBoardPort;
96 }
97
98 /***
99 * Adds a feature to the Line attribute of the StartConversationMessage
100 * object
101 *
102 *@param line The feature to be added to the Line attribute
103 *@return Description of the Return Value
104 */
105 public MsnMessage addLine(String line) {
106 StringTokenizer st = new StringTokenizer(line);
107
108 st.nextToken();
109
110
111 conversationID = st.nextToken();
112
113 String temp = st.nextToken();
114
115
116
117
118 int i = temp.indexOf(":");
119
120 switchBoardIP = temp.substring(0, i);
121
122 switchBoardPort = Integer.parseInt(temp.substring(i + 1));
123
124 st.nextToken();
125
126
127
128
129
130 switchBoardCKI = st.nextToken();
131
132 account = st.nextToken();
133
134
135 return this;
136 }
137
138
139
140
141 public void process(MsnConnection connection) {
142
143
144 }
145 }