public class ManagedConnectionProxy extends Object implements Connection, QueueConnection, TopicConnection, ExceptionListener
Constructor and Description |
---|
ManagedConnectionProxy(ActiveMQManagedConnection managedConnection,
ConnectionRequestInfo info) |
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Called by the ActiveMQManagedConnection to invalidate this proxy.
|
void |
close()
Used to let the ActiveMQManagedConnection that this connection handel is
not needed by the app.
|
ConnectionConsumer |
createConnectionConsumer(Destination destination,
String messageSelector,
ServerSessionPool sessionPool,
int maxMessages) |
ConnectionConsumer |
createConnectionConsumer(Queue queue,
String messageSelector,
ServerSessionPool sessionPool,
int maxMessages) |
ConnectionConsumer |
createConnectionConsumer(Topic topic,
String messageSelector,
ServerSessionPool sessionPool,
int maxMessages) |
ConnectionConsumer |
createDurableConnectionConsumer(Topic topic,
String subscriptionName,
String messageSelector,
ServerSessionPool sessionPool,
int maxMessages) |
QueueSession |
createQueueSession(boolean transacted,
int acknowledgeMode) |
Session |
createSession(boolean transacted,
int acknowledgeMode) |
TopicSession |
createTopicSession(boolean transacted,
int acknowledgeMode) |
String |
getClientID() |
ExceptionListener |
getExceptionListener() |
ActiveMQManagedConnection |
getManagedConnection() |
ConnectionMetaData |
getMetaData() |
void |
onException(JMSException e) |
protected void |
sessionClosed(ManagedSessionProxy session) |
void |
setClientID(String clientID)
Sets client id on delegate
|
void |
setExceptionListener(ExceptionListener listener)
sets exception listener on delegate
|
void |
setUseSharedTxContext(boolean enable) |
void |
start() |
void |
stop() |
public ManagedConnectionProxy(ActiveMQManagedConnection managedConnection, ConnectionRequestInfo info)
public void close() throws JMSException
close
in interface Connection
JMSException
public void cleanup()
public Session createSession(boolean transacted, int acknowledgeMode) throws JMSException
createSession
in interface Connection
transacted
- Whether session is transactedacknowledgeMode
- session acknowledge modeJMSException
- on errorprotected void sessionClosed(ManagedSessionProxy session)
public void setUseSharedTxContext(boolean enable) throws JMSException
JMSException
public QueueSession createQueueSession(boolean transacted, int acknowledgeMode) throws JMSException
createQueueSession
in interface QueueConnection
transacted
- Whether session is transactedacknowledgeMode
- session acknowledge modeJMSException
- on errorpublic TopicSession createTopicSession(boolean transacted, int acknowledgeMode) throws JMSException
createTopicSession
in interface TopicConnection
transacted
- Whether session is transactedacknowledgeMode
- session acknowledge modeJMSException
- on errorpublic String getClientID() throws JMSException
getClientID
in interface Connection
JMSException
public ExceptionListener getExceptionListener() throws JMSException
getExceptionListener
in interface Connection
JMSException
public ConnectionMetaData getMetaData() throws JMSException
getMetaData
in interface Connection
JMSException
public void setClientID(String clientID) throws JMSException
setClientID
in interface Connection
clientID
- new clientIdJMSException
public void setExceptionListener(ExceptionListener listener) throws JMSException
setExceptionListener
in interface Connection
listener
- new listenerJMSException
public void start() throws JMSException
start
in interface Connection
JMSException
public void stop() throws JMSException
stop
in interface Connection
JMSException
public ConnectionConsumer createConnectionConsumer(Queue queue, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException
createConnectionConsumer
in interface QueueConnection
queue
- messageSelector
- sessionPool
- maxMessages
- JMSException
public ConnectionConsumer createConnectionConsumer(Topic topic, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException
createConnectionConsumer
in interface TopicConnection
topic
- messageSelector
- sessionPool
- maxMessages
- JMSException
public ConnectionConsumer createConnectionConsumer(Destination destination, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException
createConnectionConsumer
in interface Connection
destination
- messageSelector
- sessionPool
- maxMessages
- JMSException
public ConnectionConsumer createDurableConnectionConsumer(Topic topic, String subscriptionName, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException
createDurableConnectionConsumer
in interface Connection
createDurableConnectionConsumer
in interface TopicConnection
topic
- subscriptionName
- messageSelector
- sessionPool
- maxMessages
- JMSException
public ActiveMQManagedConnection getManagedConnection()
public void onException(JMSException e)
onException
in interface ExceptionListener
Copyright © 2005–2017 FuseSource, Corp.. All rights reserved.