public class PooledConnection extends Object implements Connection
Modifier and Type | Field and Description |
---|---|
(package private) Connection |
delegate
The underlying connection to Joram's server
|
(package private) String |
name
The identity of the authentified user for this connection
|
(package private) String |
password
The identity of the authentified user for this connection
|
(package private) PooledConnectionFactory |
pcf
The pooled ConnectionFactory
|
Constructor and Description |
---|
PooledConnection(PooledConnectionFactory pcf,
String name,
String password)
Creates a new pooled connection.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the pooled connection, depending of the pool state this can results
in the real closing of the connection of the inserting in the pool of idle
connections.
|
ConnectionConsumer |
createConnectionConsumer(Destination dest,
String selector,
ServerSessionPool sessionPool,
int maxMessages) |
ConnectionConsumer |
createDurableConnectionConsumer(Topic topic,
String subName,
String selector,
ServerSessionPool sessPool,
int maxMessages) |
Session |
createSession() |
Session |
createSession(boolean transacted,
int acknowledgeMode) |
Session |
createSession(int sessionMode) |
ConnectionConsumer |
createSharedConnectionConsumer(Topic topic,
String subscriptionName,
String messageSelector,
ServerSessionPool sessionPool,
int maxMessages) |
ConnectionConsumer |
createSharedDurableConnectionConsumer(Topic topic,
String subscriptionName,
String messageSelector,
ServerSessionPool sessionPool,
int maxMessages) |
String |
getClientID() |
ExceptionListener |
getExceptionListener() |
ConnectionMetaData |
getMetaData() |
void |
setClientID(String clientID) |
void |
setExceptionListener(ExceptionListener listener) |
void |
start() |
void |
stop() |
String |
toString() |
PooledConnectionFactory pcf
Connection delegate
String name
String password
public PooledConnection(PooledConnectionFactory pcf, String name, String password) throws JMSException
pcf
- The pooled ConnectionFactory.name
- The name of the authentified user for this connection.password
- The password of the authentified user for this connection.JMSException
- An error occurs during the connection.public void close() throws JMSException
close
in interface Connection
JMSException
Connection.close()
public ConnectionConsumer createConnectionConsumer(Destination dest, String selector, ServerSessionPool sessionPool, int maxMessages) throws JMSException
createConnectionConsumer
in interface Connection
JMSException
Connection.createConnectionConsumer(javax.jms.Destination, java.lang.String, javax.jms.ServerSessionPool, int)
public ConnectionConsumer createDurableConnectionConsumer(Topic topic, String subName, String selector, ServerSessionPool sessPool, int maxMessages) throws JMSException
createDurableConnectionConsumer
in interface Connection
JMSException
Connection.createDurableConnectionConsumer(javax.jms.Topic, java.lang.String, java.lang.String, javax.jms.ServerSessionPool, int)
public Session createSession(boolean transacted, int acknowledgeMode) throws JMSException
createSession
in interface Connection
JMSException
Connection.createSession(boolean, int)
public String getClientID() throws JMSException
getClientID
in interface Connection
JMSException
Connection.getClientID()
public ExceptionListener getExceptionListener() throws JMSException
getExceptionListener
in interface Connection
JMSException
Connection.getExceptionListener()
public ConnectionMetaData getMetaData() throws JMSException
getMetaData
in interface Connection
JMSException
Connection.getMetaData()
public void setClientID(String clientID) throws JMSException
setClientID
in interface Connection
JMSException
Connection.setClientID(java.lang.String)
public void setExceptionListener(ExceptionListener listener) throws JMSException
setExceptionListener
in interface Connection
JMSException
Connection.setExceptionListener(javax.jms.ExceptionListener)
public void start() throws JMSException
start
in interface Connection
JMSException
Connection.start()
public void stop() throws JMSException
stop
in interface Connection
JMSException
Connection.stop()
public String toString()
toString
in class Object
Object.toString()
public Session createSession(int sessionMode) throws JMSException
JMSException
public Session createSession() throws JMSException
JMSException
public ConnectionConsumer createSharedConnectionConsumer(Topic topic, String subscriptionName, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException
JMSException
public ConnectionConsumer createSharedDurableConnectionConsumer(Topic topic, String subscriptionName, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException
JMSException
Copyright © 2023 ScalAgent D.T.. All rights reserved.