org.jboss.jms.server.endpoint
Class ServerSessionEndpoint

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

public class ServerSessionEndpoint
extends java.lang.Object
implements SessionEndpoint

Concrete implementation of SessionEndpoint.

Version:
$Revision: 2637 $ $Id: ServerSessionEndpoint.java 2637 2007-05-04 09:34:46Z timfox $
Author:
Ovidiu Feodorov, Tim Fox

Constructor Summary
protected ServerSessionEndpoint(int sessionID, ServerConnectionEndpoint connectionEndpoint)
           
 
Method Summary
 void acknowledge(AckInfo ackInfo)
          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
protected  void acknowledgeInternal(AckInfo ackInfo)
           
 void addTemporaryDestination(JBossDestination dest)
          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 jmsDestination, java.lang.String messageSelector)
           
 ConsumerDelegate createConsumerDelegate(JBossDestination jmsDestination, java.lang.String selector, boolean noLocal, java.lang.String subscriptionName, boolean isCC)
           
 JBossQueue createQueue(java.lang.String name)
          Creates a queue identity given a Queue name.
 JBossTopic createTopic(java.lang.String name)
          Creates a topic identity given a Queue name.
 void deleteTemporaryDestination(JBossDestination dest)
          Delete a temporary destination
protected  ServerBrowserEndpoint getBrowserDelegate(int browserID)
           
 ServerConnectionEndpoint getConnectionEndpoint()
           
protected  ServerConsumerEndpoint getConsumerEndpoint(int consumerID)
           
 boolean isClosed()
           
protected  ServerBrowserEndpoint putBrowserDelegate(int browserID, ServerBrowserEndpoint sbd)
           
protected  ServerConsumerEndpoint putConsumerEndpoint(int consumerID, ServerConsumerEndpoint d)
           
protected  ServerBrowserEndpoint removeBrowserDelegate(int browserID)
           
protected  ServerConsumerEndpoint removeConsumerEndpoint(int consumerID)
           
 void send(JBossMessage message)
          Send a message
protected  void setStarted(boolean s)
          Starts this session's Consumers
 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
 

Constructor Detail

ServerSessionEndpoint

protected ServerSessionEndpoint(int sessionID,
                                ServerConnectionEndpoint connectionEndpoint)
                         throws java.lang.Exception
Method Detail

createConsumerDelegate

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

createBrowserDelegate

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

createQueue

public JBossQueue createQueue(java.lang.String name)
                       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 name)
                       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

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 message)
          throws JMSException
Description copied from interface: SessionEndpoint
Send a message

Specified by:
send in interface SessionEndpoint
Parameters:
message - The message to send
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 ackInfo)
                 throws JMSException
Description copied from interface: SessionEndpoint
Acknowledge a message - used for auto acknowledge

Specified by:
acknowledge in interface SessionEndpoint
Parameters:
ackInfo -
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

addTemporaryDestination

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

Specified by:
addTemporaryDestination in interface SessionEndpoint
Throws:
JMSException

deleteTemporaryDestination

public void deleteTemporaryDestination(JBossDestination dest)
                                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

getConnectionEndpoint

public ServerConnectionEndpoint getConnectionEndpoint()

toString

public java.lang.String toString()

acknowledgeInternal

protected void acknowledgeInternal(AckInfo ackInfo)
                            throws java.lang.Throwable
Throws:
java.lang.Throwable

putConsumerEndpoint

protected ServerConsumerEndpoint putConsumerEndpoint(int consumerID,
                                                     ServerConsumerEndpoint d)

getConsumerEndpoint

protected ServerConsumerEndpoint getConsumerEndpoint(int consumerID)

removeConsumerEndpoint

protected ServerConsumerEndpoint removeConsumerEndpoint(int consumerID)

putBrowserDelegate

protected ServerBrowserEndpoint putBrowserDelegate(int browserID,
                                                   ServerBrowserEndpoint sbd)

getBrowserDelegate

protected ServerBrowserEndpoint getBrowserDelegate(int browserID)

removeBrowserDelegate

protected ServerBrowserEndpoint removeBrowserDelegate(int browserID)

setStarted

protected void setStarted(boolean s)
                   throws java.lang.Throwable
Starts this session's Consumers

Throws:
java.lang.Throwable


Copyright © 2006 JBoss Inc. All Rights Reserved.