Package org.xmlBlaster.util.qos

Examples of org.xmlBlaster.util.qos.QuerySpecQos


         // query with a given GetQos ...        
         GetQos getQos = new GetQos(this.glob);
         // HistoryQos historyQos = new HistoryQos(this.glob);
         // historyQos.setNumEntries(3);
         // getQos.setHistoryQos(historyQos);
         QuerySpecQos querySpecQos = new QuerySpecQos(this.glob, "QueueQuery", "1.0", "maxEntries=3&maxSize=-1&consumable=false&waitingDelay=0");
         getQos.addQuerySpec(querySpecQos);

         getOid = "__cmd:client/" + this.sessionName + "/?cbQueueEntries";
         MsgUnit[] mu = this.glob.getXmlBlasterAccess().get(new GetKey(this.glob, getOid), getQos);
         assertEquals("wrong number of retreived entries", 3, mu.length);
View Full Code Here


         long delay = waitingDelay / 3 + 10L;
         PublisherThread pubThread = new PublisherThread(this.glob, delay, msgs);

         // query with a given GetQos ...        
         GetQos getQos = new GetQos(this.glob);
         QuerySpecQos querySpecQos = new QuerySpecQos(this.glob, "QueueQuery", "1.0", "maxEntries=" + maxEntries + "&maxSize=-1&consumable=" + consumable + "&waitingDelay=" + waitingDelay);
         getQos.addQuerySpec(querySpecQos);
         String getOid = "__cmd:client/" + this.sessionName + "/?cbQueueEntries";
         MsgUnit[] mu = this.glob.getXmlBlasterAccess().get(new GetKey(this.glob, getOid), getQos);
         assertEquals("an exception occured when it should not", false, pubThread.hasException());
         assertEquals("wrong number of retreived entries", entriesExpected, mu.length);
View Full Code Here

      try {
         this.session.setSyncMode(XBSession.MODE_SYNC); // to disallow invocation of updates
         // query with a given GetQos ...        
         // TODO cache the queryKey here
         GetQos getQos = new GetQos(this.global);
         QuerySpecQos querySpecQos = new QuerySpecQos(this.global, "QueueQuery", "1.0", "maxEntries=1&maxSize=-1&consumable=true&waitingDelay=" + delay + "&subscriptionId=" + this.subscribeReturnQos.getSubscriptionId());
         getQos.addQuerySpec(querySpecQos);
         String getOid = "__cmd:" + this.session.sessionName + "/?callbackQueueEntries";
         MsgUnit[] mu = this.global.getXmlBlasterAccess().get(new GetKey(this.global, getOid), getQos);
         if (mu == null || mu.length < 1 || mu[0] == null) return null;
         String sender = mu[0].getQosData().getSender().getAbsoluteName();
View Full Code Here

      QuerySpecQos[] querySpecs = qosData.getQuerySpecArr();
      String query = null;
      if (querySpecs != null) {
         for (int i=0; i < querySpecs.length; i++) {
            if (querySpecs[i].getType().equals("QueueQuery")) {
               QuerySpecQos querySpec = querySpecs[i];
               if (querySpec.getQuery() != null)
                  query = querySpec.getQuery().getQuery();
                  // "maxEntries=3&maxSize=1000&consumable=true&waitingDelay=1000"     
               break;
            }
         }
      }
View Full Code Here

TOP

Related Classes of org.xmlBlaster.util.qos.QuerySpecQos

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.