org.jboss.jms.server.endpoint.advised
Class SessionAdvised

java.lang.Object
  extended byorg.jboss.jms.server.endpoint.advised.AdvisedSupport
      extended byorg.jboss.jms.server.endpoint.advised.SessionAdvised
All Implemented Interfaces:
Closeable, SessionEndpoint

public class SessionAdvised
extends AdvisedSupport
implements SessionEndpoint

The server-side advised instance corresponding to a Session. It is bound to the AOP Dispatcher's map.

Version:
$Revision: 1323 $ $Id: SessionAdvised.java 1323 2006-09-20 00:48:57Z ovidiu.feodorov@jboss.com $
Author:
Tim Fox, Ovidiu Feodorov

Field Summary
protected  SessionEndpoint endpoint
           
 
Constructor Summary
SessionAdvised(SessionEndpoint endpoint)
           
 
Method Summary
 void acknowledge(AckInfo ack)
          Acknowledge a message - used for auto acknowledge
 void acknowledgeBatch(java.util.List ackInfos)
          Acknowledge a batch of messages - used with client acknowledge or dups_ok acknowledge
 void addTemporaryDestination(JBossDestination destination)
          Add a temporary destination.
 void cancelDeliveries(java.util.List ackInfos)
          Cancel some deliveries.
 void close()
          Close the instance
 void closing()
          Tell the instance to prepare to close
 BrowserDelegate createBrowserDelegate(JBossDestination queue, java.lang.String messageSelector)
           
 ConsumerDelegate createConsumerDelegate(JBossDestination destination, java.lang.String selector, boolean noLocal, java.lang.String subscriptionName, boolean connectionConsumer)
           
 JBossQueue createQueue(java.lang.String queueName)
          Creates a queue identity given a Queue name.
 JBossTopic createTopic(java.lang.String topicName)
          Creates a topic identity given a Queue name.
 void deleteTemporaryDestination(JBossDestination destination)
          Delete a temporary destination
 java.lang.Object getEndpoint()
           
 boolean isClosed()
           
 void send(JBossMessage msg)
          Send a message
 java.lang.String toString()
           
 void unsubscribe(java.lang.String subscriptionName)
          Unsubscribe the client from the durable subscription specified by subscriptionName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

endpoint

protected SessionEndpoint endpoint
Constructor Detail

SessionAdvised

public SessionAdvised(SessionEndpoint endpoint)
Method Detail

close

public void close()
           throws JMSException
Description copied from interface: Closeable
Close the instance

Specified by:
close in interface Closeable
Throws:
JMSException

closing

public void closing()
             throws JMSException
Description copied from interface: Closeable
Tell the instance to prepare to close

Specified by:
closing in interface Closeable
Throws:
JMSException

isClosed

public boolean isClosed()
Specified by:
isClosed in interface Closeable

send

public void send(JBossMessage msg)
          throws JMSException
Description copied from interface: SessionEndpoint
Send a message

Specified by:
send in interface SessionEndpoint
Parameters:
msg - The message to send
Throws:
JMSException

createConsumerDelegate

public ConsumerDelegate createConsumerDelegate(JBossDestination destination,
                                               java.lang.String selector,
                                               boolean noLocal,
                                               java.lang.String subscriptionName,
                                               boolean connectionConsumer)
                                        throws JMSException
Specified by:
createConsumerDelegate in interface SessionEndpoint
Throws:
JMSException

createBrowserDelegate

public BrowserDelegate createBrowserDelegate(JBossDestination queue,
                                             java.lang.String messageSelector)
                                      throws JMSException
Specified by:
createBrowserDelegate in interface SessionEndpoint
Throws:
JMSException

createQueue

public JBossQueue createQueue(java.lang.String queueName)
                       throws JMSException
Description copied from interface: SessionEndpoint
Creates a queue identity given a Queue name. Does NOT create the physical queue. The physical creation of queues is an administrative task and is not to be initiated by the JMS API, with the exception of temporary queues.

Specified by:
createQueue in interface SessionEndpoint
Throws:
JMSException

createTopic

public JBossTopic createTopic(java.lang.String topicName)
                       throws JMSException
Description copied from interface: SessionEndpoint
Creates a topic identity given a Queue name. Does NOT create the physical topic. The physical creation of topics is an administrative task and is not to be initiated by the JMS API, with the exception of temporary topics.

Specified by:
createTopic in interface SessionEndpoint
Throws:
JMSException

acknowledgeBatch

public void acknowledgeBatch(java.util.List ackInfos)
                      throws JMSException
Description copied from interface: SessionEndpoint
Acknowledge a batch of messages - used with client acknowledge or dups_ok acknowledge

Specified by:
acknowledgeBatch in interface SessionEndpoint
Parameters:
ackInfos -
Throws:
JMSException

acknowledge

public void acknowledge(AckInfo ack)
                 throws JMSException
Description copied from interface: SessionEndpoint
Acknowledge a message - used for auto acknowledge

Specified by:
acknowledge in interface SessionEndpoint
Parameters:
ack -
Throws:
JMSException

addTemporaryDestination

public void addTemporaryDestination(JBossDestination destination)
                             throws JMSException
Description copied from interface: SessionEndpoint
Add a temporary destination.

Specified by:
addTemporaryDestination in interface SessionEndpoint
Throws:
JMSException

deleteTemporaryDestination

public void deleteTemporaryDestination(JBossDestination destination)
                                throws JMSException
Description copied from interface: SessionEndpoint
Delete a temporary destination

Specified by:
deleteTemporaryDestination in interface SessionEndpoint
Throws:
JMSException

unsubscribe

public void unsubscribe(java.lang.String subscriptionName)
                 throws JMSException
Description copied from interface: SessionEndpoint
Unsubscribe the client from the durable subscription specified by subscriptionName

Specified by:
unsubscribe in interface SessionEndpoint
Parameters:
subscriptionName - the Name of the durable subscription to unsubscribe from
Throws:
JMSException

cancelDeliveries

public void cancelDeliveries(java.util.List ackInfos)
                      throws JMSException
Description copied from interface: SessionEndpoint
Cancel some deliveries. This used at consumer close to cancel any undelivered messages left in the client buffer or at session recovery to cancel any messages that couldn't be redelivered locally

Specified by:
cancelDeliveries in interface SessionEndpoint
Parameters:
ackInfos -
Throws:
JMSException

getEndpoint

public java.lang.Object getEndpoint()
Specified by:
getEndpoint in class AdvisedSupport

toString

public java.lang.String toString()


Copyright © 2006 JBoss Inc. All Rights Reserved.