com.j_spaces.jms
Class GSTopicSessionImpl
java.lang.Object
  
com.j_spaces.jms.GSSessionImpl
      
com.j_spaces.jms.GSTopicSessionImpl
- All Implemented Interfaces: 
 - Runnable, QueueSession, Session, TopicSession
 
public class GSTopicSessionImpl
- extends GSSessionImpl
 
GigaSpaces implementation of the javax.jms.TopicSession
 interface.
 
 A TopicSession object provides methods for creating 
 TopicPublisher,TopicSubscriber( and 
 TemporaryTopic) objects. It also provides a method for deleting its
 client's durable subscribers.
 
 
 A TopicSession is used for creating Pub/Sub specific objects.
 In general, use the Session object, and use 
 TopicSession only to support existing code. Using the Session
  object simplifies the programming model, and allows transactions to
 be used across the two messaging domains.
 
 
 A TopicSession cannot be used to create objects specific to
 the point-to-point domain. The following methods inherit from Session
 , but must throw an IllegalStateException if used from
 TopicSession:
 
 createBrowser
 createQueue
 createTemporaryQueue
 
 
 
 
 
 
| 
Constructor Summary | 
GSTopicSessionImpl(com.j_spaces.jms.GSConnectionImpl connection,
                   boolean transacted,
                   int acknowledgeMode)
 
          Constructs a topic session. | 
 
 
| Methods inherited from class com.j_spaces.jms.GSSessionImpl | 
close, commit, createBytesMessage, createBytesMessage, createConsumer, createConsumer, createConsumer, createDurableSubscriber, createDurableSubscriber, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createProducer, createPublisher, createReceiver, createReceiver, createSender, createStreamMessage, createSubscriber, createSubscriber, createTemporaryTopic, createTextMessage, createTextMessage, createTopic, getAcknowledgeMode, getConsumersC, getJMSProviderName, getMessageListener, getMessagesC, getNumOfConsumedMsg, getNumOfProducedMsg, getProducersC, getSessionID, getTransacted, recover, rollback, run, setConsumersC, setMessageListener, setMessagesC, setProducersC, setSessionID, toString, unsubscribe | 
 
 
GSTopicSessionImpl
public GSTopicSessionImpl(com.j_spaces.jms.GSConnectionImpl connection,
                          boolean transacted,
                          int acknowledgeMode)
                   throws JMSException
- Constructs a topic session.
- Parameters:
 connection - The connection the session belongs to.transacted - true for a transacted session.acknowledgeMode - 1 (auto), 2 (client) or 3 (dups ok).transaction - 
- Throws:
 JMSException - In case of an invalid acknowledge mode.
 
createQueue
public Queue createQueue(String arg0)
                  throws JMSException
- Specified by:
 createQueue in interface QueueSession- Specified by:
 createQueue in interface Session- Overrides:
 createQueue in class GSSessionImpl
 
- Throws:
 JMSException- See Also:
 Session.createQueue(java.lang.String)
 
createBrowser
public QueueBrowser createBrowser(Queue arg0)
                           throws JMSException
- Specified by:
 createBrowser in interface QueueSession- Specified by:
 createBrowser in interface Session- Overrides:
 createBrowser in class GSSessionImpl
 
- Throws:
 JMSException- See Also:
 Session.createBrowser(javax.jms.Queue)
 
createBrowser
public QueueBrowser createBrowser(Queue arg0,
                                  String arg1)
                           throws JMSException
- Specified by:
 createBrowser in interface QueueSession- Specified by:
 createBrowser in interface Session- Overrides:
 createBrowser in class GSSessionImpl
 
- Throws:
 JMSException- See Also:
 Session.createBrowser(javax.jms.Queue, java.lang.String)
 
createTemporaryQueue
public TemporaryQueue createTemporaryQueue()
                                    throws JMSException
- Description copied from class: 
GSSessionImpl 
- We use the same space proxy we obtained in the session and we write another External
 Entry, which will have a class name of 'TempQueue'.
 
 The only message consumers that can consume from a temporary destination
 are those created by the same connection that created the destination. Any
 message producer can send to the temporary destination. If you close the connection
 that a temporary destination belongs to, the destination is closed and its contents
 lost.  
 You can use temporary destinations to implement a simple request/reply
 mechanism. If you create a temporary destination and specify it as the value of the
 JMSReplyTo message header field when you send a message, the consumer of the
 message can use the value of the JMSReplyTo field as the destination to which it
 sends a reply and can also reference the original request by setting the
 JMSCorrelationID header field of the reply message to the value of the
 JMSMessageID header field of the request.
- Specified by:
 createTemporaryQueue in interface QueueSession- Specified by:
 createTemporaryQueue in interface Session- Overrides:
 createTemporaryQueue in class GSSessionImpl
 
- Throws:
 JMSException- See Also:
 Session.createTemporaryQueue()