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 ConnectionJMSExceptionpublic void setClientID(java.lang.String clientId)
throws JMSException
setClientID in interface Connectionthe - new client identifier.JMSExceptionpublic ConnectionFactoryImpl getConnectionFactory()
public ExceptionListener getExceptionListener() throws JMSException
getExceptionListener in interface ConnectionJMSExceptionpublic void setExceptionListener(ExceptionListener listener) throws JMSException
setExceptionListener in interface ConnectionJMSExceptionpublic ConnectionMetaData getMetaData() throws JMSException
getMetaData in interface ConnectionJMSExceptionpublic void start()
throws JMSException
start in interface ConnectionJMSExceptionpublic void stop()
throws JMSException
stop in interface ConnectionJMSExceptionpublic Session createSession(boolean transacted, int acknowledgeMode) throws JMSException
createSession in interface ConnectioncreateSession in interface XAConnectionJMSExceptionpublic XASession createXASession() throws JMSException
createXASession in interface XAConnectionJMSExceptionprotected void addSession(JmsSession session)
public ConnectionConsumer createConnectionConsumer(Destination destination, java.lang.String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException
createConnectionConsumer in interface ConnectionJMSExceptionpublic ConnectionConsumer createDurableConnectionConsumer(Topic topic, java.lang.String name, java.lang.String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException
createDurableConnectionConsumer in interface ConnectionJMSExceptionpublic void close()
throws JMSException
close in interface ConnectionJMSExceptionprotected void checkOpen()
throws IllegalStateException
IllegalStateExceptionprotected void assignClientID()
public java.lang.String toString()
toString in class java.lang.Object