001: /*
002: * JOnAS: Java(TM) Open Application Server
003: * Copyright (C) 1999 Bull S.A.
004: * Contact: jonas-team@objectweb.org
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2.1 of the License, or any later version.
010: *
011: * This library is distributed in the hoper that irt will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this library; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
019: * USA
020: *
021: * --------------------------------------------------------------------------
022: * $Id: JmsManager.java 4663 2004-04-28 15:31:21Z durieuxp $
023: * --------------------------------------------------------------------------
024: */
025:
026: package org.objectweb.jonas_jms.api;
027:
028: import java.util.Enumeration;
029: import javax.jms.ConnectionFactory;
030: import javax.jms.Queue;
031: import javax.jms.QueueConnectionFactory;
032: import javax.jms.Topic;
033: import javax.jms.TopicConnectionFactory;
034: import javax.jms.XAConnectionFactory;
035: import javax.jms.XAQueueConnectionFactory;
036: import javax.jms.XATopicConnectionFactory;
037: import org.objectweb.transaction.jta.TransactionManager;
038:
039: /**
040: * JMS Manager interface.
041: * Implemented by the jms module (jonas_jms/JmsManagerImpl)
042: * This interface allows other jonas module to be independant
043: * of jonas_jms implementation.
044: * @author Philippe Coq
045: * Contributor(s):
046: * Jeff Mesnil: for JORAM 3.0 integration
047: * Frederic Maistre: for JORAM 3.4 (JMS 1.1) integration
048: */
049: public interface JmsManager {
050:
051: /**
052: * Initialisation of JmsManager
053: *
054: * @param class cl class implementing administration process
055: * @param boolean true for launching the MOM in the same JVM
056: * @param String connexion url to the MOM (in case of remote mode)
057: * @param TransactionManager tm
058: * @exception Exception must be thrown if the MOM is unreachable
059: */
060: public void init(Class cl, boolean collocated, String url,
061: TransactionManager tm) throws Exception;
062:
063: /**
064: * Terminate the administering process
065: */
066: public void stop() throws Exception;
067:
068: /**
069: * Create a Queue and bind it in the registry
070: */
071: public Queue createQueue(String name) throws Exception;
072:
073: /**
074: * Get Queue (creates it if not exist)
075: */
076: public Queue getQueue(String name) throws Exception;
077:
078: /**
079: * Get Queue Names
080: */
081: public Enumeration getQueuesNames();
082:
083: /**
084: * Create a Topic and bind it in the registry
085: */
086: public Topic createTopic(String name) throws Exception;
087:
088: /**
089: * Get Topic (creates it if not exist)
090: */
091: public Topic getTopic(String name) throws Exception;
092:
093: /**
094: * Get Topic Names
095: */
096: public Enumeration getTopicsNames();
097:
098: /**
099: * Get the unique ConnectionFactory
100: */
101: public ConnectionFactory getConnectionFactory();
102:
103: /**
104: * Get the unique XAConnectionFactory
105: */
106: public XAConnectionFactory getXAConnectionFactory();
107:
108: /**
109: * Get the unique TopicConnectionFactory
110: */
111: public TopicConnectionFactory getTopicConnectionFactory();
112:
113: /**
114: * Get the unique XATopicConnectionFactory
115: */
116: public XATopicConnectionFactory getXATopicConnectionFactory();
117:
118: /**
119: * Get the unique QueueConnectionFactory
120: */
121: public QueueConnectionFactory getQueueConnectionFactory();
122:
123: /**
124: * Get the unique XAQueueConnectionFactory
125: */
126: public XAQueueConnectionFactory getXAQueueConnectionFactory();
127: }
|