01: /*
02: * $Id: JmsSupport.java 10489 2008-01-23 17:53:38Z dfeist $
03: * --------------------------------------------------------------------------------------
04: * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
05: *
06: * The software in this package is published under the terms of the CPAL v1.0
07: * license, a copy of which has been included with this distribution in the
08: * LICENSE.txt file.
09: */
10:
11: package org.mule.transport.jms;
12:
13: import javax.jms.Connection;
14: import javax.jms.ConnectionFactory;
15: import javax.jms.Destination;
16: import javax.jms.JMSException;
17: import javax.jms.Message;
18: import javax.jms.MessageConsumer;
19: import javax.jms.MessageProducer;
20: import javax.jms.Session;
21:
22: /**
23: * <code>JmsSupport</code> is an interface that provides a polymorphic facade to
24: * the JMS 1.0.2b and 1.1 API specifications. this interface is not intended for
25: * general purpose use and should only be used with the Mule JMS connector.
26: */
27:
28: public interface JmsSupport {
29: Connection createConnection(ConnectionFactory connectionFactory)
30: throws JMSException;
31:
32: Connection createConnection(ConnectionFactory connectionFactory,
33: String username, String password) throws JMSException;
34:
35: Session createSession(Connection connection, boolean topic,
36: boolean transacted, int ackMode, boolean noLocal)
37: throws JMSException;
38:
39: MessageProducer createProducer(Session session,
40: Destination destination, boolean topic) throws JMSException;
41:
42: MessageConsumer createConsumer(Session session,
43: Destination destination, String messageSelector,
44: boolean noLocal, String durableName, boolean topic)
45: throws JMSException;
46:
47: MessageConsumer createConsumer(Session session,
48: Destination destination, boolean topic) throws JMSException;
49:
50: Destination createDestination(Session session, String name,
51: boolean topic) throws JMSException;
52:
53: Destination createTemporaryDestination(Session session,
54: boolean topic) throws JMSException;
55:
56: void send(MessageProducer producer, Message message, boolean topic)
57: throws JMSException;
58:
59: void send(MessageProducer producer, Message message,
60: boolean persistent, int priority, long ttl, boolean topic)
61: throws JMSException;
62:
63: void send(MessageProducer producer, Message message,
64: Destination dest, boolean topic) throws JMSException;
65:
66: void send(MessageProducer producer, Message message,
67: Destination dest, boolean persistent, int priority,
68: long ttl, boolean topic) throws JMSException;
69: }
|