KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jfox > jms > connector > JMSContainer


1 /* JFox, the OpenSource J2EE Application Server
2  *
3  * Distributable under GNU LGPL license by gun.org
4  * more details please visit http://www.huihoo.org/jfox
5  */

6
7 package org.jfox.jms.connector;
8
9 import javax.jms.Destination JavaDoc;
10 import javax.jms.JMSException JavaDoc;
11 import javax.jms.Queue JavaDoc;
12 import javax.jms.TemporaryQueue JavaDoc;
13 import javax.jms.TemporaryTopic JavaDoc;
14 import javax.jms.Topic JavaDoc;
15
16 import org.jfox.ioc.connector.Container;
17 import org.jfox.jms.message.JMSMessage;
18
19 /**
20  * JMS 容器
21  *
22  * @author <a HREF="mailto:young_yy@hotmail.com">Young Yang</a>
23  */

24
25 public interface JMSContainer extends Container {
26
27     public boolean auth(String JavaDoc userName, String JavaDoc password) throws JMSException JavaDoc;
28
29     public Queue JavaDoc createQueue(java.lang.String JavaDoc queueName) throws JMSException JavaDoc;
30
31     public Topic JavaDoc createTopic(String JavaDoc topicName) throws JMSException JavaDoc;
32
33     public TemporaryQueue JavaDoc createTemporaryQueue() throws JMSException JavaDoc;
34
35     public TemporaryTopic JavaDoc createTemporaryTopic() throws JMSException JavaDoc;
36
37     public void registerConnection(String JavaDoc clientId, Object JavaDoc conn) throws JMSException JavaDoc;
38
39     public void unregisterConnection(String JavaDoc clientId) throws JMSException JavaDoc;
40
41     public boolean isConnectionRegistered(String JavaDoc clientId);
42
43     /**
44      * register sessionId
45      * 如果 Session 是异步的,则需要根据session调用相应的 JMSConnectionRemote
46      *
47      * @param sessionId
48      * @param connectionId
49      */

50     public void registerSession(String JavaDoc connectionId, String JavaDoc sessionId) throws JMSException JavaDoc;
51
52     public void sendMessage(JMSMessage msg) throws JMSException JavaDoc;
53
54     public void sendMessageBatch(JMSMessage[] messages) throws JMSException JavaDoc;
55
56     public JMSMessage receiveMessage(String JavaDoc clientId, String JavaDoc sessionId, String JavaDoc consumerId, long timeout) throws JMSException JavaDoc;
57
58     public void registerConsumer(String JavaDoc connectionId,
59                                  String JavaDoc sessionId,
60                                  String JavaDoc consumerId,
61                                  Destination JavaDoc destination) throws JMSException JavaDoc;
62
63     public void setConsumerAsync(String JavaDoc clientId,
64                                  String JavaDoc sessionId,
65                                  String JavaDoc consumerId,
66                                  boolean async) throws JMSException JavaDoc;
67
68     public void startConnection(String JavaDoc clientId) throws JMSException JavaDoc;
69
70     public void stopConnection(String JavaDoc clientId) throws JMSException JavaDoc;
71
72     public void acknowledge(String JavaDoc clientId, String JavaDoc sessionId, String JavaDoc consumerId, String JavaDoc messageId) throws JMSException JavaDoc;
73
74     public void closeSession(String JavaDoc clientId, String JavaDoc sessionId) throws JMSException JavaDoc;
75 }
76
Popular Tags