org.jboss.messaging.jms.client
Class JBossConnection

java.lang.Object
  extended by org.jboss.messaging.jms.client.JBossConnection
All Implemented Interfaces:
javax.jms.Connection, javax.jms.QueueConnection, javax.jms.TopicConnection, javax.jms.XAConnection, javax.jms.XAQueueConnection, javax.jms.XATopicConnection

public class JBossConnection
extends java.lang.Object
implements javax.jms.Connection, javax.jms.QueueConnection, javax.jms.TopicConnection, javax.jms.XAConnection, javax.jms.XAQueueConnection, javax.jms.XATopicConnection

Version:
$Revision: 4262 $ $Id: JBossConnection.java 4262 2008-05-21 11:07:40Z timfox $
Author:
Ovidiu Feodorov, Tim Fox

Constructor Summary
JBossConnection(ClientConnection connection, int connectionType, java.lang.String clientID, int dupsOKBatchSize)
           
 
Method Summary
 void close()
           
 javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Destination destination, java.lang.String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages)
           
 javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Queue queue, java.lang.String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages)
           
 javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Topic topic, java.lang.String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages)
           
 javax.jms.ConnectionConsumer createDurableConnectionConsumer(javax.jms.Topic topic, java.lang.String subscriptionName, java.lang.String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages)
           
 javax.jms.QueueSession createQueueSession(boolean transacted, int acknowledgeMode)
           
 javax.jms.Session createSession(boolean transacted, int acknowledgeMode)
           
 javax.jms.Session createSession(boolean transacted, int acknowledgeMode, boolean cacheProducers)
           
protected  JBossSession createSessionInternal(boolean transacted, int acknowledgeMode, boolean isXA, int type, boolean cacheProducers)
           
 javax.jms.TopicSession createTopicSession(boolean transacted, int acknowledgeMode)
           
 javax.jms.TopicSession createTopicSession(boolean transacted, int acknowledgeMode, boolean cacheProducers)
           
 javax.jms.XAQueueSession createXAQueueSession()
           
 javax.jms.XAQueueSession createXAQueueSession(boolean cacheProducers)
           
 javax.jms.XASession createXASession()
           
 javax.jms.XASession createXASession(boolean cacheProducers)
           
 javax.jms.XATopicSession createXATopicSession()
           
 javax.jms.XATopicSession createXATopicSession(boolean cacheProducers)
           
 java.lang.String getClientID()
           
 ClientConnection getConnection()
           
 javax.jms.ExceptionListener getExceptionListener()
           
 javax.jms.ConnectionMetaData getMetaData()
           
 void setClientID(java.lang.String clientID)
           
 void setExceptionListener(javax.jms.ExceptionListener listener)
           
 void start()
           
 void stop()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JBossConnection

public JBossConnection(ClientConnection connection,
                       int connectionType,
                       java.lang.String clientID,
                       int dupsOKBatchSize)
Method Detail

createSession

public javax.jms.Session createSession(boolean transacted,
                                       int acknowledgeMode)
                                throws javax.jms.JMSException
Specified by:
createSession in interface javax.jms.Connection
Specified by:
createSession in interface javax.jms.XAConnection
Throws:
javax.jms.JMSException

getClientID

public java.lang.String getClientID()
                             throws javax.jms.JMSException
Specified by:
getClientID in interface javax.jms.Connection
Throws:
javax.jms.JMSException

setClientID

public void setClientID(java.lang.String clientID)
                 throws javax.jms.JMSException
Specified by:
setClientID in interface javax.jms.Connection
Throws:
javax.jms.JMSException

getMetaData

public javax.jms.ConnectionMetaData getMetaData()
                                         throws javax.jms.JMSException
Specified by:
getMetaData in interface javax.jms.Connection
Throws:
javax.jms.JMSException

getExceptionListener

public javax.jms.ExceptionListener getExceptionListener()
                                                 throws javax.jms.JMSException
Specified by:
getExceptionListener in interface javax.jms.Connection
Throws:
javax.jms.JMSException

setExceptionListener

public void setExceptionListener(javax.jms.ExceptionListener listener)
                          throws javax.jms.JMSException
Specified by:
setExceptionListener in interface javax.jms.Connection
Throws:
javax.jms.JMSException

start

public void start()
           throws javax.jms.JMSException
Specified by:
start in interface javax.jms.Connection
Throws:
javax.jms.JMSException

stop

public void stop()
          throws javax.jms.JMSException
Specified by:
stop in interface javax.jms.Connection
Throws:
javax.jms.JMSException

close

public void close()
           throws javax.jms.JMSException
Specified by:
close in interface javax.jms.Connection
Throws:
javax.jms.JMSException

createConnectionConsumer

public javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Destination destination,
                                                             java.lang.String messageSelector,
                                                             javax.jms.ServerSessionPool sessionPool,
                                                             int maxMessages)
                                                      throws javax.jms.JMSException
Specified by:
createConnectionConsumer in interface javax.jms.Connection
Throws:
javax.jms.JMSException

createDurableConnectionConsumer

public javax.jms.ConnectionConsumer createDurableConnectionConsumer(javax.jms.Topic topic,
                                                                    java.lang.String subscriptionName,
                                                                    java.lang.String messageSelector,
                                                                    javax.jms.ServerSessionPool sessionPool,
                                                                    int maxMessages)
                                                             throws javax.jms.JMSException
Specified by:
createDurableConnectionConsumer in interface javax.jms.Connection
Specified by:
createDurableConnectionConsumer in interface javax.jms.TopicConnection
Throws:
javax.jms.JMSException

createQueueSession

public javax.jms.QueueSession createQueueSession(boolean transacted,
                                                 int acknowledgeMode)
                                          throws javax.jms.JMSException
Specified by:
createQueueSession in interface javax.jms.QueueConnection
Specified by:
createQueueSession in interface javax.jms.XAQueueConnection
Throws:
javax.jms.JMSException

createConnectionConsumer

public javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Queue queue,
                                                             java.lang.String messageSelector,
                                                             javax.jms.ServerSessionPool sessionPool,
                                                             int maxMessages)
                                                      throws javax.jms.JMSException
Specified by:
createConnectionConsumer in interface javax.jms.QueueConnection
Throws:
javax.jms.JMSException

createTopicSession

public javax.jms.TopicSession createTopicSession(boolean transacted,
                                                 int acknowledgeMode)
                                          throws javax.jms.JMSException
Specified by:
createTopicSession in interface javax.jms.TopicConnection
Specified by:
createTopicSession in interface javax.jms.XATopicConnection
Throws:
javax.jms.JMSException

createConnectionConsumer

public javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Topic topic,
                                                             java.lang.String messageSelector,
                                                             javax.jms.ServerSessionPool sessionPool,
                                                             int maxMessages)
                                                      throws javax.jms.JMSException
Specified by:
createConnectionConsumer in interface javax.jms.TopicConnection
Throws:
javax.jms.JMSException

createXASession

public javax.jms.XASession createXASession()
                                    throws javax.jms.JMSException
Specified by:
createXASession in interface javax.jms.XAConnection
Throws:
javax.jms.JMSException

createXAQueueSession

public javax.jms.XAQueueSession createXAQueueSession()
                                              throws javax.jms.JMSException
Specified by:
createXAQueueSession in interface javax.jms.XAQueueConnection
Throws:
javax.jms.JMSException

createXATopicSession

public javax.jms.XATopicSession createXATopicSession()
                                              throws javax.jms.JMSException
Specified by:
createXATopicSession in interface javax.jms.XATopicConnection
Throws:
javax.jms.JMSException

createSession

public javax.jms.Session createSession(boolean transacted,
                                       int acknowledgeMode,
                                       boolean cacheProducers)
                                throws javax.jms.JMSException
Throws:
javax.jms.JMSException

createTopicSession

public javax.jms.TopicSession createTopicSession(boolean transacted,
                                                 int acknowledgeMode,
                                                 boolean cacheProducers)
                                          throws javax.jms.JMSException
Throws:
javax.jms.JMSException

createXASession

public javax.jms.XASession createXASession(boolean cacheProducers)
                                    throws javax.jms.JMSException
Throws:
javax.jms.JMSException

createXAQueueSession

public javax.jms.XAQueueSession createXAQueueSession(boolean cacheProducers)
                                              throws javax.jms.JMSException
Throws:
javax.jms.JMSException

createXATopicSession

public javax.jms.XATopicSession createXATopicSession(boolean cacheProducers)
                                              throws javax.jms.JMSException
Throws:
javax.jms.JMSException

getConnection

public ClientConnection getConnection()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

createSessionInternal

protected JBossSession createSessionInternal(boolean transacted,
                                             int acknowledgeMode,
                                             boolean isXA,
                                             int type,
                                             boolean cacheProducers)
                                      throws javax.jms.JMSException
Throws:
javax.jms.JMSException


Copyright © 2006 JBoss Inc. All Rights Reserved.