org.jboss.mq.server
Class JMSDestinationManager

java.lang.Object
  extended byorg.jboss.mq.server.JMSServerInterceptorSupport (src) 
      extended byorg.jboss.mq.server.JMSDestinationManager
All Implemented Interfaces:
JMSServerInterceptor (src)

public class JMSDestinationManager
extends JMSServerInterceptorSupport (src)

This class implements the JMS provider


Field Summary
 java.util.Map closingDestinations
          Destinations being closed SpyDestination -> JMSDestination
 java.util.Map destinations
          Destinations SpyDestination -> JMSDestination
static java.lang.String JBOSS_VESION
          Description of the Field
 java.lang.ThreadGroup threadGroup
          Thread group
 
Fields inherited from class org.jboss.mq.server.JMSServerInterceptorSupport (src)
nextInterceptor
 
Constructor Summary
JMSDestinationManager(BasicQueueParameters (src)  parameters)
          Constructor for the JMSServer object
 
Method Summary
 void acknowledge(ConnectionToken (src)  dc, AcknowledgementRequest (src)  item)
          #Description of the Method
 void acknowledge(ConnectionToken (src)  dc, AcknowledgementRequest (src)  item, Tx (src)  txId)
          #Description of the Method
 void addDestination(JMSDestination (src)  destination)
          Adds a feature to the Destination attribute of the JMSServer object
 void addMessage(ConnectionToken (src)  dc, SpyMessage (src)  val)
          Adds a feature to the Message attribute of the JMSServer object
 void addMessage(ConnectionToken (src)  dc, SpyMessage (src)  val, Tx (src)  txId)
          Adds a feature to the Message attribute of the JMSServer object
 java.lang.String authenticate(java.lang.String id, java.lang.String password)
          authenticate user and return a session id.
 SpyMessage (src) [] browse(ConnectionToken (src)  dc, Destination (src)  dest, java.lang.String selector)
          #Description of the Method
 void checkID(java.lang.String ID)
          Check a clienID set by the client.
 java.lang.String checkUser(java.lang.String userName, java.lang.String password)
          #Description of the Method
 void closeDestination(SpyDestination (src)  dest)
          Closed a destination that was opened previously
 void connectionClosing(ConnectionToken (src)  dc)
          #Description of the Method
 void connectionFailure(ConnectionToken (src)  dc)
          #Description of the Method
 Queue (src) createQueue(ConnectionToken (src)  dc, java.lang.String name)
          #Description of the Method
 Topic (src) createTopic(ConnectionToken (src)  dc, java.lang.String name)
          #Description of the Method
protected  void deleteTemporaryDestination(ConnectionToken (src)  dc, JMSDestination (src)  destination)
           
 void deleteTemporaryDestination(ConnectionToken (src)  dc, SpyDestination (src)  dest)
          #Description of the Method
 void destroySubscription(ConnectionToken (src)  dc, DurableSubscriptionID (src)  id)
          #Description of the Method
 ClientConsumer (src) getClientConsumer(ConnectionToken (src)  dc)
          Gets the ClientConsumer attribute of the JMSServer object
 int getClientCount()
           
 java.util.HashMap getClients()
          Obtain a copy of the current clients
 SpyTopic (src) getDurableTopic(DurableSubscriptionID (src)  sub)
          Get the topic the durable subscription is on.
 java.lang.String getID()
          Gets the ID attribute of the JMSServer object
 JMSDestination (src) getJMSDestination(SpyDestination (src)  dest)
          Gets the JMSDestination attribute of the JMSServer object
 MessageCache (src) getMessageCache()
          Gets the messageCache
 MessageCounter (src) [] getMessageCounter()
          Gets message counters of all configured destinations
 PersistenceManager (src) getPersistenceManager()
          Gets the PersistenceManager attribute of the JMSServer object
protected  JMSDestination (src) getPossiblyClosingJMSDestination(SpyDestination (src)  dest)
          Gets the JMSDestination attribute of the JMSServer object which might be being closed
 StateManager (src) getStateManager()
          Gets the StateManager attribute of the JMSServer object
 Subscription (src) getSubscription(ConnectionToken (src)  dc, int subscriberId)
          Get the subscription that match the id.
 TemporaryQueue (src) getTemporaryQueue(ConnectionToken (src)  dc)
          Gets the TemporaryQueue attribute of the JMSServer object
 TemporaryTopic (src) getTemporaryTopic(ConnectionToken (src)  dc)
          Gets the TemporaryTopic attribute of the JMSServer object
 java.lang.ThreadGroup getThreadGroup()
          Get the thread group of the server.
 boolean isStopped()
          Returns false if the JMS server is currently running and handling requests, true otherwise.
 void ping(ConnectionToken (src)  dc, long clientTime)
          #Description of the Method
 SpyMessage (src) receive(ConnectionToken (src)  dc, int subscriberId, long wait)
          #Description of the Method
 void resetMessageCounter()
          Resets message counters of all configured destinations
 void setEnabled(ConnectionToken (src)  dc, boolean enabled)
          Sets the Enabled attribute of the JMSServer object
 void setMessageCache(MessageCache (src)  messageCache)
          Sets the messageCache
 void setPersistenceManager(PersistenceManager (src)  newPersistenceManager)
          Sets the PersistenceManager attribute of the JMSServer object
 void setStateManager(StateManager (src)  newStateManager)
          Sets the StateManager attribute of the JMSServer object
 void startServer()
          #Description of the Method
 void stopServer()
          #Description of the Method
 void subscribe(ConnectionToken (src)  dc, Subscription (src)  sub)
          #Description of the Method
 java.lang.String toString()
          #Description of the Method
 void transact(ConnectionToken (src)  dc, TransactionRequest (src)  t)
          The following function performs a Unit Of Work.
 void unsubscribe(ConnectionToken (src)  dc, int subscriptionId)
          #Description of the Method
 
Methods inherited from class org.jboss.mq.server.JMSServerInterceptorSupport (src)
getNext, setNext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

JBOSS_VESION

public static final java.lang.String JBOSS_VESION
Description of the Field

See Also:
Constant Field Values (src)

destinations

public java.util.Map destinations
Destinations SpyDestination -> JMSDestination


closingDestinations

public java.util.Map closingDestinations
Destinations being closed SpyDestination -> JMSDestination


threadGroup

public java.lang.ThreadGroup threadGroup
Thread group

Constructor Detail

JMSDestinationManager

public JMSDestinationManager(BasicQueueParameters (src)  parameters)
Constructor for the JMSServer object

Method Detail

setEnabled

public void setEnabled(ConnectionToken (src)  dc,
                       boolean enabled)
                throws JMSException (src) 
Sets the Enabled attribute of the JMSServer object

Specified by:
setEnabled in interface JMSServerInterceptor (src)
Overrides:
setEnabled in class JMSServerInterceptorSupport (src)
Parameters:
dc - The new Enabled value
enabled - The new Enabled value
Throws:
JMSException (src) - Description of Exception

setStateManager

public void setStateManager(StateManager (src)  newStateManager)
Sets the StateManager attribute of the JMSServer object

Parameters:
newStateManager - The new StateManager value

setPersistenceManager

public void setPersistenceManager(PersistenceManager (src)  newPersistenceManager)
Sets the PersistenceManager attribute of the JMSServer object

Parameters:
newPersistenceManager - The new PersistenceManager value

isStopped

public boolean isStopped()
Returns false if the JMS server is currently running and handling requests, true otherwise.

Returns:
false if the JMS server is currently running and handling requests, true otherwise.

getClientCount

public int getClientCount()
Returns:
the current client count

getClients

public java.util.HashMap getClients()
Obtain a copy of the current clients

Returns:
a HashMap of current clients

getThreadGroup

public java.lang.ThreadGroup getThreadGroup()
Description copied from class: JMSServerInterceptorSupport (src)
Get the thread group of the server.

Specified by:
getThreadGroup in interface JMSServerInterceptor (src)
Overrides:
getThreadGroup in class JMSServerInterceptorSupport (src)

getID

public java.lang.String getID()
Gets the ID attribute of the JMSServer object

Specified by:
getID in interface JMSServerInterceptor (src)
Overrides:
getID in class JMSServerInterceptorSupport (src)
Returns:
The ID value

getTemporaryTopic

public TemporaryTopic (src)  getTemporaryTopic(ConnectionToken (src)  dc)
                                 throws JMSException (src) 
Gets the TemporaryTopic attribute of the JMSServer object

Specified by:
getTemporaryTopic in interface JMSServerInterceptor (src)
Overrides:
getTemporaryTopic in class JMSServerInterceptorSupport (src)
Parameters:
dc - Description of Parameter
Returns:
The TemporaryTopic value
Throws:
JMSException (src) - Description of Exception

getTemporaryQueue

public TemporaryQueue (src)  getTemporaryQueue(ConnectionToken (src)  dc)
                                 throws JMSException (src) 
Gets the TemporaryQueue attribute of the JMSServer object

Specified by:
getTemporaryQueue in interface JMSServerInterceptor (src)
Overrides:
getTemporaryQueue in class JMSServerInterceptorSupport (src)
Parameters:
dc - Description of Parameter
Returns:
The TemporaryQueue value
Throws:
JMSException (src) - Description of Exception

getClientConsumer

public ClientConsumer (src)  getClientConsumer(ConnectionToken (src)  dc)
                                 throws JMSException (src) 
Gets the ClientConsumer attribute of the JMSServer object

Parameters:
dc - Description of Parameter
Returns:
The ClientConsumer value
Throws:
JMSException (src) - Description of Exception

getJMSDestination

public JMSDestination (src)  getJMSDestination(SpyDestination (src)  dest)
Gets the JMSDestination attribute of the JMSServer object

Parameters:
dest - Description of Parameter
Returns:
The JMSDestination value

getPossiblyClosingJMSDestination

protected JMSDestination (src)  getPossiblyClosingJMSDestination(SpyDestination (src)  dest)
Gets the JMSDestination attribute of the JMSServer object which might be being closed

Parameters:
dest - Description of Parameter
Returns:
The JMSDestination value

getStateManager

public StateManager (src)  getStateManager()
Gets the StateManager attribute of the JMSServer object

Returns:
The StateManager value

getPersistenceManager

public PersistenceManager (src)  getPersistenceManager()
Gets the PersistenceManager attribute of the JMSServer object

Returns:
The PersistenceManager value

startServer

public void startServer()
#Description of the Method


stopServer

public void stopServer()
#Description of the Method


checkID

public void checkID(java.lang.String ID)
             throws JMSException (src) 
Check a clienID set by the client.

Specified by:
checkID in interface JMSServerInterceptor (src)
Overrides:
checkID in class JMSServerInterceptorSupport (src)
Parameters:
ID - Description of Parameter
Throws:
JMSException (src) - Description of Exception

addMessage

public void addMessage(ConnectionToken (src)  dc,
                       SpyMessage (src)  val)
                throws JMSException (src) 
Adds a feature to the Message attribute of the JMSServer object

Specified by:
addMessage in interface JMSServerInterceptor (src)
Overrides:
addMessage in class JMSServerInterceptorSupport (src)
Parameters:
dc - The feature to be added to the Message attribute
val - The feature to be added to the Message attribute
Throws:
JMSException (src) - Description of Exception

addMessage

public void addMessage(ConnectionToken (src)  dc,
                       SpyMessage (src)  val,
                       Tx (src)  txId)
                throws JMSException (src) 
Adds a feature to the Message attribute of the JMSServer object

Parameters:
dc - The feature to be added to the Message attribute
val - The feature to be added to the Message attribute
txId - The feature to be added to the Message attribute
Throws:
JMSException (src) - Description of Exception

transact

public void transact(ConnectionToken (src)  dc,
                     TransactionRequest (src)  t)
              throws JMSException (src) 
The following function performs a Unit Of Work.

Specified by:
transact in interface JMSServerInterceptor (src)
Overrides:
transact in class JMSServerInterceptorSupport (src)
Parameters:
dc - Description of Parameter
t - Description of Parameter
Throws:
JMSException (src) - Description of Exception

acknowledge

public void acknowledge(ConnectionToken (src)  dc,
                        AcknowledgementRequest (src)  item)
                 throws JMSException (src) 
#Description of the Method

Specified by:
acknowledge in interface JMSServerInterceptor (src)
Overrides:
acknowledge in class JMSServerInterceptorSupport (src)
Parameters:
dc - Description of Parameter
item - Description of Parameter
Throws:
JMSException (src) - Description of Exception

acknowledge

public void acknowledge(ConnectionToken (src)  dc,
                        AcknowledgementRequest (src)  item,
                        Tx (src)  txId)
                 throws JMSException (src) 
#Description of the Method

Parameters:
dc - Description of Parameter
item - Description of Parameter
txId - Description of Parameter
Throws:
JMSException (src) - Description of Exception

connectionClosing

public void connectionClosing(ConnectionToken (src)  dc)
                       throws JMSException (src) 
#Description of the Method

Specified by:
connectionClosing in interface JMSServerInterceptor (src)
Overrides:
connectionClosing in class JMSServerInterceptorSupport (src)
Parameters:
dc - Description of Parameter
Throws:
JMSException (src) - Description of Exception

connectionFailure

public void connectionFailure(ConnectionToken (src)  dc)
                       throws JMSException (src) 
#Description of the Method

Parameters:
dc - Description of Parameter
Throws:
JMSException (src) - Description of Exception

subscribe

public void subscribe(ConnectionToken (src)  dc,
                      Subscription (src)  sub)
               throws JMSException (src) 
#Description of the Method

Specified by:
subscribe in interface JMSServerInterceptor (src)
Overrides:
subscribe in class JMSServerInterceptorSupport (src)
Parameters:
dc - Description of Parameter
sub - Description of Parameter
Throws:
JMSException (src) - Description of Exception

unsubscribe

public void unsubscribe(ConnectionToken (src)  dc,
                        int subscriptionId)
                 throws JMSException (src) 
#Description of the Method

Specified by:
unsubscribe in interface JMSServerInterceptor (src)
Overrides:
unsubscribe in class JMSServerInterceptorSupport (src)
Parameters:
dc - Description of Parameter
subscriptionId - Description of Parameter
Throws:
JMSException (src) - Description of Exception

destroySubscription

public void destroySubscription(ConnectionToken (src)  dc,
                                DurableSubscriptionID (src)  id)
                         throws JMSException (src) 
#Description of the Method

Specified by:
destroySubscription in interface JMSServerInterceptor (src)
Overrides:
destroySubscription in class JMSServerInterceptorSupport (src)
Parameters:
id - Description of Parameter
Throws:
JMSException (src) - Description of Exception

browse

public SpyMessage (src) [] browse(ConnectionToken (src)  dc,
                           Destination (src)  dest,
                           java.lang.String selector)
                    throws JMSException (src) 
#Description of the Method

Specified by:
browse in interface JMSServerInterceptor (src)
Overrides:
browse in class JMSServerInterceptorSupport (src)
Parameters:
dc - Description of Parameter
dest - Description of Parameter
selector - Description of Parameter
Returns:
Description of the Returned Value
Throws:
JMSException (src) - Description of Exception

receive

public SpyMessage (src)  receive(ConnectionToken (src)  dc,
                          int subscriberId,
                          long wait)
                   throws JMSException (src) 
#Description of the Method

Specified by:
receive in interface JMSServerInterceptor (src)
Overrides:
receive in class JMSServerInterceptorSupport (src)
Parameters:
dc - Description of Parameter
subscriberId - Description of Parameter
wait - Description of Parameter
Returns:
Description of the Returned Value
Throws:
JMSException (src) - Description of Exception

createQueue

public Queue (src)  createQueue(ConnectionToken (src)  dc,
                         java.lang.String name)
                  throws JMSException (src) 
#Description of the Method

Specified by:
createQueue in interface JMSServerInterceptor (src)
Overrides:
createQueue in class JMSServerInterceptorSupport (src)
Parameters:
dc - Description of Parameter
name - Description of Parameter
Returns:
Description of the Returned Value
Throws:
JMSException (src) - Description of Exception

createTopic

public Topic (src)  createTopic(ConnectionToken (src)  dc,
                         java.lang.String name)
                  throws JMSException (src) 
#Description of the Method

Specified by:
createTopic in interface JMSServerInterceptor (src)
Overrides:
createTopic in class JMSServerInterceptorSupport (src)
Parameters:
dc - Description of Parameter
name - Description of Parameter
Returns:
Description of the Returned Value
Throws:
JMSException (src) - Description of Exception

deleteTemporaryDestination

public void deleteTemporaryDestination(ConnectionToken (src)  dc,
                                       SpyDestination (src)  dest)
                                throws JMSException (src) 
#Description of the Method

Specified by:
deleteTemporaryDestination in interface JMSServerInterceptor (src)
Overrides:
deleteTemporaryDestination in class JMSServerInterceptorSupport (src)
Parameters:
dc - Description of Parameter
dest - Description of Parameter
Throws:
JMSException (src) - Description of Exception

deleteTemporaryDestination

protected void deleteTemporaryDestination(ConnectionToken (src)  dc,
                                          JMSDestination (src)  destination)
                                   throws JMSException (src) 
Throws:
JMSException (src)

checkUser

public java.lang.String checkUser(java.lang.String userName,
                                  java.lang.String password)
                           throws JMSException (src) 
#Description of the Method

Specified by:
checkUser in interface JMSServerInterceptor (src)
Overrides:
checkUser in class JMSServerInterceptorSupport (src)
Parameters:
userName - Description of Parameter
password - Description of Parameter
Returns:
Description of the Returned Value
Throws:
JMSException (src) - Description of Exception

authenticate

public java.lang.String authenticate(java.lang.String id,
                                     java.lang.String password)
                              throws JMSException (src) 
authenticate user and return a session id. Same as checkID.

Specified by:
authenticate in interface JMSServerInterceptor (src)
Overrides:
authenticate in class JMSServerInterceptorSupport (src)
Parameters:
id - Description of Parameter
password - Description of Parameter
Returns:
a sessionId
Throws:
JMSException (src) - Description of Exception

addDestination

public void addDestination(JMSDestination (src)  destination)
                    throws JMSException (src) 
Adds a feature to the Destination attribute of the JMSServer object

Throws:
JMSException (src) - Description of Exception

closeDestination

public void closeDestination(SpyDestination (src)  dest)
                      throws JMSException (src) 
Closed a destination that was opened previously

Parameters:
dest - the destionation to close
Throws:
JMSException (src) - Description of Exception

toString

public java.lang.String toString()
#Description of the Method

Returns:
Description of the Returned Value

ping

public void ping(ConnectionToken (src)  dc,
                 long clientTime)
          throws JMSException (src) 
#Description of the Method

Specified by:
ping in interface JMSServerInterceptor (src)
Overrides:
ping in class JMSServerInterceptorSupport (src)
Parameters:
dc - Description of Parameter
clientTime - Description of Parameter
Throws:
JMSException (src) - Description of Exception

getMessageCache

public MessageCache (src)  getMessageCache()
Gets the messageCache

Returns:
Returns a MessageCache

setMessageCache

public void setMessageCache(MessageCache (src)  messageCache)
Sets the messageCache

Parameters:
messageCache - The messageCache to set

getDurableTopic

public SpyTopic (src)  getDurableTopic(DurableSubscriptionID (src)  sub)
                         throws JMSException (src) 
Description copied from interface: JMSServerInterceptor (src)
Get the topic the durable subscription is on. Primary for internal use in the server, and not for the IL's.

Specified by:
getDurableTopic in interface JMSServerInterceptor (src)
Overrides:
getDurableTopic in class JMSServerInterceptorSupport (src)
Throws:
JMSException (src)

getSubscription

public Subscription (src)  getSubscription(ConnectionToken (src)  dc,
                                    int subscriberId)
                             throws JMSException (src) 
Description copied from interface: JMSServerInterceptor (src)
Get the subscription that match the id.

Specified by:
getSubscription in interface JMSServerInterceptor (src)
Overrides:
getSubscription in class JMSServerInterceptorSupport (src)
Throws:
JMSException (src)

getMessageCounter

public MessageCounter (src) [] getMessageCounter()
Gets message counters of all configured destinations

Returns:
MessageCounter[] message counter array sorted by name

resetMessageCounter

public void resetMessageCounter()
Resets message counters of all configured destinations