User: user57  
  Date: 01/08/21 16:21:51

  Modified:    src/main/org/jboss/mq Subscription.java
  Log:
   o changed comments to javadocs
  
  Revision  Changes    Path
  1.3       +32 -24    jbossmq/src/main/org/jboss/mq/Subscription.java
  
  Index: Subscription.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/Subscription.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Subscription.java 2001/08/17 03:04:01     1.2
  +++ Subscription.java 2001/08/21 23:21:51     1.3
  @@ -8,63 +8,71 @@
   
   import java.io.Serializable;
   
  +import javax.jms.JMSException;
  +
   import org.jboss.mq.selectors.Selector;
   
   /**
  - *  This class contians all the data needed to for a the provider to to
  - *  determine if a message can be routed to a consumer.
  + * This class contains all the data needed to for a the provider to to
  + * determine if a message can be routed to a consumer.
    *
    * @author     Hiram Chirino ([EMAIL PROTECTED])
    * @author     David Maplesden ([EMAIL PROTECTED])
    * @created    August 16, 2001
  - * @version    $Revision: 1.2 $
  + * @version    $Revision: 1.3 $
    */
   public class Subscription
  -       implements Serializable {
  -   // This gets set to a unique value at the SpyConnection
  +       implements Serializable
  +{
  +   /** This gets set to a unique value at the SpyConnection. */
      public int       subscriptionId;
  -   // the queue we want to subscribe to
  +   
  +   /** The queue we want to subscribe to. */
      public SpyDestination destination;
  -   // the selector which will filter out messages
  +   
  +   /** The selector which will filter out messages. */
      public String    messageSelector;
  -   // Should this message destroy the subscription?
  +   
  +   /** Should this message destroy the subscription? */
      public boolean   destroyDurableSubscription;
   
  -   // Topics might not want locally produced messages
  +   /** Topics might not want locally produced messages. */
      public boolean   noLocal;
   
      // Transient Values
      public transient Selector selector;
      public transient ConnectionToken dc;
  -   public transient Object clientConsumer = null;
  -
  -   // Determines the consumer would accept the message.
  -   public Selector getSelector()
  -      throws javax.jms.JMSException {
  +   public transient Object clientConsumer; // = null;
   
  -      if ( messageSelector == null ) {
  +   /**
  +    * Determines the consumer would accept the message.
  +    */
  +   public Selector getSelector() throws JMSException {
  +      if (messageSelector == null) {
            return null;
         }
   
  -      if ( selector == null ) {
  -         selector = new Selector( messageSelector );
  +      if (selector == null) {
  +         selector = new Selector(messageSelector);
         }
   
         return selector;
      }
   
  -   // Determines the consumer would accept the message.
  -   public boolean accepts( SpyMessage message )
  -      throws javax.jms.JMSException {
  -      if ( message.getJMSDestination() instanceof SpyTopic ) {
  +   /**
  +    * Determines the consumer would accept the message.
  +    */
  +   public boolean accepts(SpyMessage message) throws JMSException {
  +      if (message.getJMSDestination() instanceof SpyTopic) {
            // In the Topic case we allways deliver unless we have a noLocal
  -         if ( noLocal && message.producerClientId.equals( dc.getClientID() ) ) {
  +         if (noLocal && message.producerClientId.equals(dc.getClientID())) {
               return false;
            }
         }
  +      
         Selector ms = getSelector();
  -      if ( ms != null ) {
  -         if ( !ms.test( message ) ) {
  +      if (ms != null) {
  +         if (!ms.test(message)) {
               return false;
            }
         }
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to