Package org.apache.activemq
Class ActiveMQContext
- java.lang.Object
-
- org.apache.activemq.ActiveMQContext
-
- All Implemented Interfaces:
AutoCloseable
,JMSContext
public class ActiveMQContext extends Object implements JMSContext
In terms of the JMS 1.1 API a JMSContext should be thought of as representing both a Connection and a Session. Although the simplified API removes the need for applications to use those objects, the concepts of connection and session remain important. A connection represents a physical link to the JMS server and a session represents a single-threaded context for sending and receiving messages.- See Also:
JMSContext
-
-
Field Summary
-
Fields inherited from interface javax.jms.JMSContext
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, SESSION_TRANSACTED
-
-
Method Summary
-
-
-
Method Detail
-
createContext
public JMSContext createContext(int sessionMode)
- Specified by:
createContext
in interfaceJMSContext
-
createProducer
public JMSProducer createProducer()
- Specified by:
createProducer
in interfaceJMSContext
-
getClientID
public String getClientID()
- Specified by:
getClientID
in interfaceJMSContext
-
setClientID
public void setClientID(String clientID)
- Specified by:
setClientID
in interfaceJMSContext
-
getMetaData
public ConnectionMetaData getMetaData()
- Specified by:
getMetaData
in interfaceJMSContext
-
getExceptionListener
public ExceptionListener getExceptionListener()
- Specified by:
getExceptionListener
in interfaceJMSContext
-
setExceptionListener
public void setExceptionListener(ExceptionListener listener)
- Specified by:
setExceptionListener
in interfaceJMSContext
-
start
public void start()
- Specified by:
start
in interfaceJMSContext
-
stop
public void stop()
- Specified by:
stop
in interfaceJMSContext
-
setAutoStart
public void setAutoStart(boolean autoStart)
- Specified by:
setAutoStart
in interfaceJMSContext
-
getAutoStart
public boolean getAutoStart()
- Specified by:
getAutoStart
in interfaceJMSContext
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceJMSContext
-
createBytesMessage
public BytesMessage createBytesMessage()
- Specified by:
createBytesMessage
in interfaceJMSContext
-
createMapMessage
public MapMessage createMapMessage()
- Specified by:
createMapMessage
in interfaceJMSContext
-
createMessage
public Message createMessage()
- Specified by:
createMessage
in interfaceJMSContext
-
createObjectMessage
public ObjectMessage createObjectMessage()
- Specified by:
createObjectMessage
in interfaceJMSContext
-
createObjectMessage
public ObjectMessage createObjectMessage(Serializable object)
- Specified by:
createObjectMessage
in interfaceJMSContext
-
createStreamMessage
public StreamMessage createStreamMessage()
- Specified by:
createStreamMessage
in interfaceJMSContext
-
createTextMessage
public TextMessage createTextMessage()
- Specified by:
createTextMessage
in interfaceJMSContext
-
createTextMessage
public TextMessage createTextMessage(String text)
- Specified by:
createTextMessage
in interfaceJMSContext
-
getTransacted
public boolean getTransacted()
- Specified by:
getTransacted
in interfaceJMSContext
-
getSessionMode
public int getSessionMode()
- Specified by:
getSessionMode
in interfaceJMSContext
-
commit
public void commit()
- Specified by:
commit
in interfaceJMSContext
-
rollback
public void rollback()
- Specified by:
rollback
in interfaceJMSContext
-
recover
public void recover()
- Specified by:
recover
in interfaceJMSContext
-
createConsumer
public JMSConsumer createConsumer(Destination destination)
- Specified by:
createConsumer
in interfaceJMSContext
-
createConsumer
public JMSConsumer createConsumer(Destination destination, String messageSelector)
- Specified by:
createConsumer
in interfaceJMSContext
-
createConsumer
public JMSConsumer createConsumer(Destination destination, String messageSelector, boolean noLocal)
- Specified by:
createConsumer
in interfaceJMSContext
-
createQueue
public Queue createQueue(String queueName)
- Specified by:
createQueue
in interfaceJMSContext
-
createTopic
public Topic createTopic(String topicName)
- Specified by:
createTopic
in interfaceJMSContext
-
createDurableConsumer
public JMSConsumer createDurableConsumer(Topic topic, String name)
- Specified by:
createDurableConsumer
in interfaceJMSContext
-
createDurableConsumer
public JMSConsumer createDurableConsumer(Topic topic, String name, String messageSelector, boolean noLocal)
- Specified by:
createDurableConsumer
in interfaceJMSContext
-
createSharedDurableConsumer
public JMSConsumer createSharedDurableConsumer(Topic topic, String name)
- Specified by:
createSharedDurableConsumer
in interfaceJMSContext
-
createSharedDurableConsumer
public JMSConsumer createSharedDurableConsumer(Topic topic, String name, String messageSelector)
- Specified by:
createSharedDurableConsumer
in interfaceJMSContext
-
createSharedConsumer
public JMSConsumer createSharedConsumer(Topic topic, String sharedSubscriptionName)
- Specified by:
createSharedConsumer
in interfaceJMSContext
-
createSharedConsumer
public JMSConsumer createSharedConsumer(Topic topic, String sharedSubscriptionName, String messageSelector)
- Specified by:
createSharedConsumer
in interfaceJMSContext
-
createBrowser
public QueueBrowser createBrowser(Queue queue)
- Specified by:
createBrowser
in interfaceJMSContext
-
createBrowser
public QueueBrowser createBrowser(Queue queue, String messageSelector)
- Specified by:
createBrowser
in interfaceJMSContext
-
createTemporaryQueue
public TemporaryQueue createTemporaryQueue()
- Specified by:
createTemporaryQueue
in interfaceJMSContext
-
createTemporaryTopic
public TemporaryTopic createTemporaryTopic()
- Specified by:
createTemporaryTopic
in interfaceJMSContext
-
unsubscribe
public void unsubscribe(String name)
- Specified by:
unsubscribe
in interfaceJMSContext
-
acknowledge
public void acknowledge()
- Specified by:
acknowledge
in interfaceJMSContext
-
-