Package org.jboss.jms.server.selector

Examples of org.jboss.jms.server.selector.Selector


     
      // the particular tests here are motivated by the
      // wildcards of the current underlying RE engine,
      // GNU regexp.
     
      selector = new Selector("MyString LIKE 'a^$b'");
      message.setStringProperty("MyString", "a^$b");
      assertTrue(selector.accept(message));
     
      // this one has a double backslash since backslash
      // is interpreted specially by Java
      selector = new Selector("MyString LIKE 'a\\dc'");
      message.setStringProperty("MyString", "a\\dc");
      assertTrue(selector.accept(message));
     
      selector = new Selector("MyString LIKE 'a.c'");
      message.setStringProperty("MyString", "abc");
      assertTrue(!selector.accept(message));
     
      selector = new Selector("MyString LIKE '[abc]'");
      message.setStringProperty("MyString", "[abc]");
      assertTrue(selector.accept(message));
     
      selector = new Selector("MyString LIKE '[^abc]'");
      message.setStringProperty("MyString", "[^abc]");
      assertTrue(selector.accept(message));
     
      selector = new Selector("MyString LIKE '[a-c]'");
      message.setStringProperty("MyString", "[a-c]");
      assertTrue(selector.accept(message));
     
      selector = new Selector("MyString LIKE '[:alpha]'");
      message.setStringProperty("MyString", "[:alpha]");
      assertTrue(selector.accept(message));
     
      selector = new Selector("MyString LIKE '(abc)'");
      message.setStringProperty("MyString", "(abc)");
      assertTrue(selector.accept(message));
     
      selector = new Selector("MyString LIKE 'a|bc'");
      message.setStringProperty("MyString", "a|bc");
      assertTrue(selector.accept(message));
     
      selector = new Selector("MyString LIKE '(abc)?'");
      message.setStringProperty("MyString", "(abc)?");
      assertTrue(selector.accept(message));
     
      selector = new Selector("MyString LIKE '(abc)*'");
      message.setStringProperty("MyString", "(abc)*");
      assertTrue(selector.accept(message));
     
      selector = new Selector("MyString LIKE '(abc)+'");
      message.setStringProperty("MyString", "(abc)+");
      assertTrue(selector.accept(message));
     
      selector = new Selector("MyString LIKE '(abc){3}'");
      message.setStringProperty("MyString", "(abc){3}");
      assertTrue(selector.accept(message));
     
      selector = new Selector("MyString LIKE '(abc){3,5}'");
      message.setStringProperty("MyString", "(abc){3,5}");
      assertTrue(selector.accept(message));
     
      selector = new Selector("MyString LIKE '(abc){3,}'");
      message.setStringProperty("MyString", "(abc){3,}");
      assertTrue(selector.accept(message));
     
      selector = new Selector("MyString LIKE '(?=abc)'");
      message.setStringProperty("MyString", "(?=abc)");
      assertTrue(selector.accept(message));
     
      selector = new Selector("MyString LIKE '(?!abc)'");
      message.setStringProperty("MyString", "(?!abc)");
      assertTrue(selector.accept(message));
   }
View Full Code Here


/*  74 */     this.id = id;
/*  75 */     this.destination = destination;
/*     */
/*  77 */     if (messageSelector != null)
/*     */     {
/*  79 */       this.filter = new Selector(messageSelector);
/*     */     }
/*     */   }
View Full Code Here

/*      */       }
/*      */     }
/*      */
/* 1893 */     String consumerID = GUIDGenerator.generateGUID();
/*      */
/* 1896 */     Selector selector = null;
/*      */
/* 1898 */     if (selectorString != null)
/*      */     {
/* 1900 */       selector = new Selector(selectorString);
/*      */     }
/*      */     Queue queue;
/* 1905 */     if (jmsDestination.isTopic())
/*      */     {
/* 1907 */       if (subscriptionName == null)
View Full Code Here

/* 144 */     return listMessages(2, selector);
/*     */   }
/*     */
/*     */   private List listMessages(int type, String selector) throws Exception
/*     */   {
/* 149 */     Selector sel = null;
/*     */
/* 151 */     if ((selector != null) && ("".equals(selector.trim())))
/*     */     {
/* 153 */       selector = null;
/*     */     }
/*     */
/* 156 */     if (selector != null)
/*     */     {
/* 158 */       sel = new Selector(selector);
/*     */     }
/*     */
/* 161 */     List msgs = new ArrayList();
/*     */
/* 163 */     List allMsgs = this.queue.browse(sel);
View Full Code Here

/* 216 */     if ((binding == null) || (!binding.queue.isActive()))
/*     */     {
/* 218 */       throw new IllegalArgumentException("Cannot find subscription with id " + subId);
/*     */     }
/*     */
/* 221 */     Selector sel = null;
/*     */
/* 223 */     if ((selector != null) && ("".equals(selector.trim())))
/*     */     {
/* 225 */       selector = null;
/*     */     }
/*     */
/* 228 */     if (selector != null)
/*     */     {
/* 230 */       sel = new Selector(selector);
/*     */     }
/*     */
/* 233 */     List allMsgs = binding.queue.browse(sel);
/*     */
/* 235 */     Iterator iter = allMsgs.iterator();
View Full Code Here

/*     */
/* 171 */     if (selector != null)
/*     */     {
/* 173 */       if (this.trace) log.trace("creating selector:" + selector);
/*     */
/* 175 */       this.messageSelector = new Selector(selector);
/* 176 */       if (this.trace) log.trace("created selector");
/*     */     }
/*     */
/* 179 */     this.started = this.sessionEndpoint.getConnectionEndpoint().isStarted();
/*     */
View Full Code Here

      }
     
      String consumerID = GUIDGenerator.generateGUID();
     
      // Always validate the selector first
      Selector selector = null;
     
      if (selectorString != null)
      {
         selector = new Selector(selectorString);
      }
     
      Queue queue;
     
      if (jmsDestination.isTopic())
View Full Code Here

      this.id = id;
      this.destination = destination;

    if (messageSelector != null)
    { 
      filter = new Selector(messageSelector);   
    }
   }
View Full Code Here

TOP

Related Classes of org.jboss.jms.server.selector.Selector

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.