public class ConnectionImpl extends java.lang.Object implements XAConnection
Constructor and Description |
---|
ConnectionImpl(ConnectionFactoryImpl factory) |
ConnectionImpl(ConnectionFactoryImpl factory,
boolean isXA) |
Modifier and Type | Method and Description |
---|---|
protected void |
addSession(JmsSession session)
Adds a session.
|
protected void |
assignClientID()
Assigns a random client id.
|
protected void |
checkOpen()
Checks that the session is open.
|
void |
close()
Closes the connection.
|
ConnectionConsumer |
createConnectionConsumer(Destination destination,
java.lang.String messageSelector,
ServerSessionPool sessionPool,
int maxMessages)
Creates a new consumer (optional)
|
ConnectionConsumer |
createDurableConnectionConsumer(Topic topic,
java.lang.String name,
java.lang.String messageSelector,
ServerSessionPool sessionPool,
int maxMessages)
Creates a new consumer (optional)
|
Session |
createSession(boolean transacted,
int acknowledgeMode)
Creates a new connection session.
|
XASession |
createXASession()
Creates a new connection session.
|
java.lang.String |
getClientID()
Returns the connection's client identifier.
|
ConnectionFactoryImpl |
getConnectionFactory()
Returns the connection factory.
|
ExceptionListener |
getExceptionListener()
Returns the connection's exception listener.
|
ConnectionMetaData |
getMetaData()
Returns the connection's metadata.
|
boolean |
isXA()
Returns true for an XA connection.
|
void |
setClientID(java.lang.String clientId)
Sets the connections client identifier.
|
void |
setExceptionListener(ExceptionListener listener)
Returns the connection's exception listener.
|
void |
start()
Start (or restart) a connection.
|
void |
stop()
Stops the connection temporarily.
|
java.lang.String |
toString() |
public ConnectionImpl(ConnectionFactoryImpl factory, boolean isXA)
public ConnectionImpl(ConnectionFactoryImpl factory)
public boolean isXA()
public java.lang.String getClientID() throws JMSException
getClientID
in interface Connection
JMSException
public void setClientID(java.lang.String clientId) throws JMSException
setClientID
in interface Connection
the
- new client identifier.JMSException
public ConnectionFactoryImpl getConnectionFactory()
public ExceptionListener getExceptionListener() throws JMSException
getExceptionListener
in interface Connection
JMSException
public void setExceptionListener(ExceptionListener listener) throws JMSException
setExceptionListener
in interface Connection
JMSException
public ConnectionMetaData getMetaData() throws JMSException
getMetaData
in interface Connection
JMSException
public void start() throws JMSException
start
in interface Connection
JMSException
public void stop() throws JMSException
stop
in interface Connection
JMSException
public Session createSession(boolean transacted, int acknowledgeMode) throws JMSException
createSession
in interface Connection
createSession
in interface XAConnection
JMSException
public XASession createXASession() throws JMSException
createXASession
in interface XAConnection
JMSException
protected void addSession(JmsSession session)
public ConnectionConsumer createConnectionConsumer(Destination destination, java.lang.String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException
createConnectionConsumer
in interface Connection
JMSException
public ConnectionConsumer createDurableConnectionConsumer(Topic topic, java.lang.String name, java.lang.String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException
createDurableConnectionConsumer
in interface Connection
JMSException
public void close() throws JMSException
close
in interface Connection
JMSException
protected void checkOpen() throws IllegalStateException
IllegalStateException
protected void assignClientID()
public java.lang.String toString()
toString
in class java.lang.Object