Package org.xmlBlaster.client.qos

Examples of org.xmlBlaster.client.qos.PublishQos.toXml()


         })// Login to xmlBlaster, default handler for updates

         String xmlKey = null;
         PublishQos qw = new PublishQos(glob);
         EraseQos eq = new EraseQos(glob);
         System.out.println("qos = " + qw.toXml() );
         byte[] b = new byte[1024];
         long lCount = 0L;
         while(true) {
            lCount++;
            xmlKey =  "<key oid='" + lCount +
View Full Code Here


         while(true) {
            lCount++;
            xmlKey =  "<key oid='" + lCount +
                           "'> <topic id='aaaa'/>" +
                           "</key>";
            con.publish(new MsgUnit(xmlKey,b,qw.toXml()));

            try { Thread.sleep(5L); } catch( InterruptedException i) {}

            EraseKey ek = new EraseKey(glob, "" + lCount);
            EraseReturnQos[] er = con.erase(ek.toXml(), eq.toXml());
View Full Code Here

         })// Login to xmlBlaster, default handler for updates

         String xmlKey = null;
         PublishQos qw = new PublishQos(glob);
         qw.setVolatile(true);
         System.out.println("qos = " + qw.toXml() );
         byte[] b = new byte[1024];
         while(true) {
            lCount++;
            xmlKey =  "<key oid='" + lCount +
                           "'> <topic id='aaaa'/>" +
View Full Code Here

         while(true) {
            lCount++;
            xmlKey =  "<key oid='" + lCount +
                           "'> <topic id='aaaa'/>" +
                           "</key>";
            con.publish(new MsgUnit(xmlKey,b,qw.toXml()));
            // System.out.println(new Timestamp(System.currentTimeMillis())+":"+lCount);
            if ((lCount % bulkSize) == 0) {
               log.info("Sent " + lCount + " different topics, enter return to continue, enter 'q' to quit");
               try {
                  BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
View Full Code Here

         })// Login to xmlBlaster, default handler for updates

         String xmlKey = null;
         PublishQos qw = new PublishQos(glob);
         System.out.println("qos = " + qw.toXml() );
         byte[] b = new byte[1024];
         while(true) {
            lCount++;
            xmlKey =  "<key oid='OneMessage'> <topic id='aaaa'/> </key>";
            con.publish(new MsgUnit(xmlKey,b,qw.toXml()));
View Full Code Here

         System.out.println("qos = " + qw.toXml() );
         byte[] b = new byte[1024];
         while(true) {
            lCount++;
            xmlKey =  "<key oid='OneMessage'> <topic id='aaaa'/> </key>";
            con.publish(new MsgUnit(xmlKey,b,qw.toXml()));
            // System.out.println(new Timestamp(System.currentTimeMillis())+":"+lCount);
            if ((lCount % bulkSize) == 0) {
               try {
                  if (interactive) {
                     log.info("Sent " + lCount + " identical messages, enter return to continue, enter 'q' to quit");
View Full Code Here

      if (qos == null) {
         if (attrMap != null) {
            PublishQos pubQos = new PublishQos(this.glob);
            ClientPropertiesInfo tmpInfo = new ClientPropertiesInfo(pubQos.getData().getClientProperties(), null);
            InfoHelper.fillInfoWithEntriesFromMap(tmpInfo, attrMap);
            qos = pubQos.toXml();
         }
         else {
            qos = "<qos/>";
         }
      }
View Full Code Here

      pq.addDestination(new Destination(receiver));
      pq.setSender(new SessionName(glob, getLoginName())); // Set ourself as sender
      pq.setSubscribable(false); // For the time being we don't allow others to subscribe on the PtP notification
      pq.setState(action);
      pq.setStateInfo("Notification about special message treatment in plugin " + pluginName + ", dispatcher state=" + currStatus);
      MsgUnit msgUnit = new MsgUnit(glob, "<key oid='" + entry.getKeyOid() + "'/>", "", pq.toXml());
      //xmlBlasterImpl.publish(sessionId, msgUnit);
      xmlBlasterCon.publish(msgUnit);
   }

   /**
 
View Full Code Here

        
         PublishQos pq = new PublishQos(glob);
         for(int i=0; i<sessionNameArr.length; i++)
            pq.addDestination(new Destination(sessionNameArr[i]));
        
         MsgUnit msgUnit = new MsgUnit("<key oid='"+oid+"'/>", content.getBytes(), pq.toXml());

         PublishReturnQos rq = conHolder.con.publish(msgUnit);
        
         log.info("SUCCESS publish '" + oid + "' with " + sessionNameArr.length + " destinations, returned state=" + rq.getState());
         assertEquals("Returned oid wrong", oid, rq.getKeyOid());
View Full Code Here

         int numCreate = 1000000;
         MsgQueuePublishEntry entryArr[] = new MsgQueuePublishEntry[numCreate];
         log.info("Hit a key for new MsgQueuePublishEntry RAM size test ...");
         try { System.in.read(); } catch(java.io.IOException e) {}
         for(int i=0; i<numCreate; i++) {
            MsgUnit msgUnit = new MsgUnit(glob, "<key oid='XX'/>", new byte[0], publishQos.toXml());
            entryArr[i] = new MsgQueuePublishEntry(glob, msgUnit, storageId);
            if (i > 0 && (i % step) == 0) {
               log.info("Overall created #" + i + ": Created " + step + " new MsgQueuePublishEntry instances, msgUnitSize=" + msgUnit.size() + ", hit a key to create more ...");
               try { System.in.read(); } catch(java.io.IOException e) {}
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.