1 /*
2 * @(#)LinkServer.java
3 *
4 * JFoxMQ the open source JMS MOM.
5 *
6 * Corpyright 2002-2003 Huihoo Power, Inc. All Rights Reserved. This software
7 * is licensed under LGPL license.
8 *
9 * For more information, please visit: http://www.huihoo.org
10 */
11
12 package org.huihoo.jfox.ms.crb;
13
14 import javax.jms.Destination;
15 import javax.jms.Message;
16 import javax.jms.Queue;
17 import javax.jms.TemporaryQueue;
18 import javax.jms.TemporaryTopic;
19 import javax.jms.Topic;
20
21 /***
22 * Defines the methods that can be called by a client on the server.
23 *
24 * @author Liang.Zhao (zlushangnwpu@sina.com)
25 * @version @created July 23th 2003
26 */
27 public interface LinkServer {
28
29 /***
30 * @return LinkServer
31 * @exception Exception
32 */
33 public LinkServer cloneLinkServer() throws Exception;
34
35 /***
36 * Get a clientID from the server.
37 *
38 * @return an internally generated clientID.
39 * @exception Exception
40 */
41 public String getID() throws Exception;
42
43 /***
44 * Gets the TemporaryTopic
45 *
46 * @param
47 * @return TemporaryTopic
48 * @exception Exception
49 */
50 public TemporaryTopic createTemporaryTopic() throws Exception;
51
52 /***
53 * Gets the TemporaryQueue
54 *
55 * @param
56 * @return TemporaryQueue
57 * @exception Exception
58 */
59 public TemporaryQueue createTemporaryQueue() throws Exception;
60
61 /***
62 * The client close the connection.
63 *
64 * @param
65 * @exception Exception
66 */
67 public void closeConnection() throws Exception;
68
69 /***
70 * Check if clientID is a valid ID
71 *
72 * @param String
73 * ID
74 * @exception Exception
75 */
76 public void checkID(String ID) throws Exception;
77
78 /***
79 * Send a message to the destination specifyed in the message.
80 *
81 * @param Message
82 * @exception Exception
83 */
84 public void sendMessage(Message message) throws Exception;
85
86 /***
87 * Create a queue identity
88 *
89 * @param String
90 * destination
91 * @return Queue
92 * @exception Exception
93 */
94 public Queue createQueue(String destination) throws Exception;
95
96 /***
97 * Create a topic identity
98 *
99 * @param destination
100 * @return Topic
101 * @exception Exception
102 */
103 public Topic createTopic(String destination) throws Exception;
104
105 /***
106 * Delete a temporary destination from server
107 *
108 * @param Destination
109 * destination
110 * @exception Exception
111 */
112 public void deleteTemporaryDestination(Destination destination)
113 throws Exception;
114
115 /***
116 * Commit a transaction
117 *
118 * @param TransactionRequest
119 * t
120 * @exception Exception
121 */
122 //public void CommitTransaction(TransactionRequest t)
123 // throws Exception;
124
125 /***
126 * Send a acknowledge to server
127 *
128 * @param AcknowledgementRequest
129 * ack
130 * @exception Exception
131 */
132 //public void sendAcknowledge(AcknowledgementRequest ack)
133 // throws Exception;
134
135 /***
136 * Browse message on given destination
137 *
138 * @param Destination
139 * destination
140 * @param String
141 * selector
142 * @return Message[]
143 * @exception Exception
144 */
145 public Message[] browse(Destination destination, String selector)
146 throws Exception;
147
148 /***
149 * Receive a message synchronously.
150 *
151 * @param Destination
152 * destination
153 * @param long
154 * wait
155 * @return Message
156 * @exception Exception
157 */
158 public Message receiveMessage(Destination destination, long wait)
159 throws Exception;
160
161 /***
162 * Remove a subcriber.
163 *
164 * @param
165 * @exception Exception
166 * Description of Exception
167 */
168 //public void removeSubscriber()
169 // throws Exception;
170
171 /***
172 * Authenticate the user.
173 *
174 * @param String
175 * userName
176 * @param String
177 * password
178 * @return boolean
179 * @exception Exception
180 */
181 public boolean authenticate(String userName, String password)
182 throws Exception;
183
184 /***
185 * @param
186 * @exception java.lang.Exception
187 * The exception description.
188 */
189 //void addSubscriber()
190 // throws java.lang.Exception;
191
192 }
This page was automatically generated by Maven