|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.activemq.pool.PooledConnection
public class PooledConnection
Represents a proxy Connection which is-a TopicConnection and
QueueConnection which is pooled and on close() will return
its reference to the ConnectionPool backing it.
NOTE this implementation is only intended for use when sending
messages. It does not deal with pooling of consumers; for that look at a
library like Jencks such as in this example
| Constructor Summary | |
|---|---|
PooledConnection(ConnectionPool pool)
Creates a new PooledConnection instance that uses the given ConnectionPool to create and manage its resources. |
|
| Method Summary | |
|---|---|
protected void |
assertNotClosed()
|
protected void |
cleanupConnectionTemporaryDestinations()
Remove all of the temporary destinations created for this connection. |
void |
close()
|
javax.jms.ConnectionConsumer |
createConnectionConsumer(javax.jms.Destination destination,
String selector,
javax.jms.ServerSessionPool serverSessionPool,
int maxMessages)
|
javax.jms.ConnectionConsumer |
createConnectionConsumer(javax.jms.Queue queue,
String selector,
javax.jms.ServerSessionPool serverSessionPool,
int maxMessages)
|
javax.jms.ConnectionConsumer |
createConnectionConsumer(javax.jms.Topic topic,
String s,
javax.jms.ServerSessionPool serverSessionPool,
int maxMessages)
|
javax.jms.ConnectionConsumer |
createDurableConnectionConsumer(javax.jms.Topic topic,
String selector,
String s1,
javax.jms.ServerSessionPool serverSessionPool,
int i)
|
javax.jms.QueueSession |
createQueueSession(boolean transacted,
int ackMode)
|
javax.jms.Session |
createSession(boolean transacted,
int ackMode)
|
protected org.apache.activemq.ActiveMQSession |
createSession(SessionKey key)
|
javax.jms.TopicSession |
createTopicSession(boolean transacted,
int ackMode)
|
String |
getClientID()
|
org.apache.activemq.ActiveMQConnection |
getConnection()
|
org.apache.activemq.advisory.DestinationSource |
getDestinationSource()
|
javax.jms.ExceptionListener |
getExceptionListener()
|
javax.jms.ConnectionMetaData |
getMetaData()
|
int |
getNumActiveSessions()
|
int |
getNumSessions()
|
int |
getNumtIdleSessions()
|
PooledConnection |
newInstance()
Factory method to create a new instance. |
void |
onTemporaryQueueCreate(javax.jms.TemporaryQueue tempQueue)
Called on successful creation of a new TemporaryQueue. |
void |
onTemporaryTopicCreate(javax.jms.TemporaryTopic tempTopic)
Called on successful creation of a new TemporaryTopic. |
void |
setClientID(String clientID)
|
void |
setExceptionListener(javax.jms.ExceptionListener exceptionListener)
|
void |
start()
|
void |
stop()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PooledConnection(ConnectionPool pool)
pool - The connection and pool manager backing this proxy connection object.| Method Detail |
|---|
public PooledConnection newInstance()
public void close()
throws javax.jms.JMSException
close in interface javax.jms.Connectionclose in interface org.apache.activemq.Closeablejavax.jms.JMSException
public void start()
throws javax.jms.JMSException
start in interface javax.jms.Connectionjavax.jms.JMSException
public void stop()
throws javax.jms.JMSException
stop in interface javax.jms.Connectionjavax.jms.JMSException
public javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Destination destination,
String selector,
javax.jms.ServerSessionPool serverSessionPool,
int maxMessages)
throws javax.jms.JMSException
createConnectionConsumer in interface javax.jms.Connectionjavax.jms.JMSException
public javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Topic topic,
String s,
javax.jms.ServerSessionPool serverSessionPool,
int maxMessages)
throws javax.jms.JMSException
createConnectionConsumer in interface javax.jms.TopicConnectionjavax.jms.JMSException
public javax.jms.ConnectionConsumer createDurableConnectionConsumer(javax.jms.Topic topic,
String selector,
String s1,
javax.jms.ServerSessionPool serverSessionPool,
int i)
throws javax.jms.JMSException
createDurableConnectionConsumer in interface javax.jms.ConnectioncreateDurableConnectionConsumer in interface javax.jms.TopicConnectionjavax.jms.JMSException
public String getClientID()
throws javax.jms.JMSException
getClientID in interface javax.jms.Connectionjavax.jms.JMSException
public javax.jms.ExceptionListener getExceptionListener()
throws javax.jms.JMSException
getExceptionListener in interface javax.jms.Connectionjavax.jms.JMSException
public javax.jms.ConnectionMetaData getMetaData()
throws javax.jms.JMSException
getMetaData in interface javax.jms.Connectionjavax.jms.JMSException
public void setExceptionListener(javax.jms.ExceptionListener exceptionListener)
throws javax.jms.JMSException
setExceptionListener in interface javax.jms.Connectionjavax.jms.JMSException
public void setClientID(String clientID)
throws javax.jms.JMSException
setClientID in interface javax.jms.Connectionjavax.jms.JMSException
public javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Queue queue,
String selector,
javax.jms.ServerSessionPool serverSessionPool,
int maxMessages)
throws javax.jms.JMSException
createConnectionConsumer in interface javax.jms.QueueConnectionjavax.jms.JMSException
public javax.jms.QueueSession createQueueSession(boolean transacted,
int ackMode)
throws javax.jms.JMSException
createQueueSession in interface javax.jms.QueueConnectionjavax.jms.JMSException
public javax.jms.TopicSession createTopicSession(boolean transacted,
int ackMode)
throws javax.jms.JMSException
createTopicSession in interface javax.jms.TopicConnectionjavax.jms.JMSException
public javax.jms.Session createSession(boolean transacted,
int ackMode)
throws javax.jms.JMSException
createSession in interface javax.jms.Connectionjavax.jms.JMSException
public org.apache.activemq.advisory.DestinationSource getDestinationSource()
throws javax.jms.JMSException
getDestinationSource in interface org.apache.activemq.EnhancedConnectionjavax.jms.JMSExceptionpublic void onTemporaryQueueCreate(javax.jms.TemporaryQueue tempQueue)
tempQueue - The TemporaryQueue just created.public void onTemporaryTopicCreate(javax.jms.TemporaryTopic tempTopic)
tempTopic - The TemporaryTopic just created.
public org.apache.activemq.ActiveMQConnection getConnection()
throws javax.jms.JMSException
javax.jms.JMSException
protected void assertNotClosed()
throws org.apache.activemq.AlreadyClosedException
org.apache.activemq.AlreadyClosedException
protected org.apache.activemq.ActiveMQSession createSession(SessionKey key)
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic String toString()
toString in class Objectprotected void cleanupConnectionTemporaryDestinations()
public int getNumSessions()
public int getNumActiveSessions()
public int getNumtIdleSessions()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||