Examples of EraseQos


Examples of org.xmlBlaster.client.qos.EraseQos

   }

   public EraseReturnQos[] sendErase(boolean forceDestroy) {
      log.info("Erasing a topic forceDestroy=" + forceDestroy);
      try {
         EraseQos eq = new EraseQos(glob);
         eq.setForceDestroy(forceDestroy);
         EraseKey ek = new EraseKey(glob, this.publishOid);
         EraseReturnQos[] er = con.erase(ek.toXml(), eq.toXml());
         return er;
      } catch(XmlBlasterException e) {
         fail("Erase XmlBlasterException: " + e.getMessage());
      }
      return null;
View Full Code Here

Examples of org.xmlBlaster.client.qos.EraseQos

    */
   protected void tearDown() {
      if (con1 != null) {
         try {
            EraseKey ek = new EraseKey(glob, "command-navigation");
            EraseQos eq = new EraseQos(glob);
            con1.erase(ek.toXml(), eq.toXml());

            ek = new EraseKey(glob, "command-radar-1");
            eq = new EraseQos(glob);
            con1.erase(ek.toXml(), eq.toXml());

            ek = new EraseKey(glob, "dummyTestSubXPathMany");
            eq = new EraseQos(glob);
            con1.erase(ek.toXml(), eq.toXml());
         }
         catch (XmlBlasterException e) {
            fail("doPublish failed: " + e.toString());
         }
         con1.disconnect(null);
View Full Code Here

Examples of org.xmlBlaster.client.qos.EraseQos

   }

   public EraseReturnQos[] sendErase(boolean forceDestroy) {
      log.info("Erasing a topic forceDestroy=" + forceDestroy);
      try {
         EraseQos eq = new EraseQos(glob);
         eq.setForceDestroy(forceDestroy);
         EraseKey ek = new EraseKey(glob, publishOid);
         EraseReturnQos[] er = con.erase(ek.toXml(), eq.toXml());
         return er;
      } catch(XmlBlasterException e) {
         fail("Erase XmlBlasterException: " + e.getMessage());
      }
      return null;
View Full Code Here

Examples of org.xmlBlaster.client.qos.EraseQos

         return id;
      }
      if (this.eraseOnDrop && "DROP".equals(command)) {
         String oid = this.glob.getMsgKeyFactory().readObject(pk).getOid();
         EraseKey ek = new EraseKey(glob, oid);
         EraseQos eq = new EraseQos(glob);
         con.erase(ek, eq);
         log.info("Topic '" + pk + "' is erased:" + out);
         return "0";
      }
      if (this.eraseOnDelete && "DELETE".equals(command)) {
         String oid = this.glob.getMsgKeyFactory().readObject(pk).getOid();
         EraseKey ek = new EraseKey(glob, oid);
         EraseQos eq = new EraseQos(glob);
         con.erase(ek, eq);
         log.info("Topic '" + pk + "' is erased:" + out);
         return "0";
      }
      if (log.isLoggable(Level.FINER))
View Full Code Here

Examples of org.xmlBlaster.client.qos.EraseQos

            }
            if (line != null && line.trim().length() > 0) {
               conn.publish(msg);
            }
         }
         conn.erase(new EraseKey(global, "broadcastChecker"), new EraseQos(global));
         conn.disconnect(new DisconnectQos(global));
         br.close();
      }
      catch (Throwable ex) {
         ex.printStackTrace();
View Full Code Here

Examples of org.xmlBlaster.client.qos.EraseQos

         UnSubscribeQos uq = new UnSubscribeQos(glob);
         UnSubscribeReturnQos[] urq = con.unSubscribe(uk, uq);
         if (urq.length > 0) log.info("Unsubscribed from topic");

         EraseKey ek = new EraseKey(glob, "HelloWorld3");
         EraseQos eq = new EraseQos(glob);
         EraseReturnQos[] eraseArr = con.erase(ek, eq);
         if (eraseArr.length > 0) log.info("Erased topic");

         DisconnectQos dq = new DisconnectQos(glob);
         con.disconnect(dq);
View Full Code Here

Examples of org.xmlBlaster.client.qos.EraseQos

            }

            if (ret == 0 || ret == 'e') {
               EraseKey ek = new EraseKey(glob, oid);
               if (domain != null) ek.setDomain(domain);
               EraseQos eq = new EraseQos(glob);
               eq.setForceDestroy(eraseForceDestroy);
               if (log.isLoggable(Level.FINEST)) log.finest("Going to erase the topic: " + ek.toXml() + eq.toXml());
               /*EraseReturnQos[] eraseArr =*/con.erase(ek, eq);
               log.info("Erase success");
            }
         }

View Full Code Here

Examples of org.xmlBlaster.client.qos.EraseQos

    * @throws XmlBlasterException
    */
   public void shutdown(boolean doEraseTopic) throws XmlBlasterException {
      if (log.isLoggable(Level.FINER)) log.finer("shutdown");
      if (this.publishOid != null && doEraseTopic) {
         this.accessor.erase(new EraseKey(this.global, this.publishOid), new EraseQos(this.global));
      }
      this.accessor.disconnect(new DisconnectQos(this.global));
   }
View Full Code Here

Examples of org.xmlBlaster.client.qos.EraseQos

         })// 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 +
                           "'> <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());
        
            // System.out.println(new Timestamp(System.currentTimeMillis())+":"+lCount);
            if ((lCount % bulkSize) == 0) {
               log.info("Published and erased " + lCount + " topics, enter return to continue, enter 'q' to quit");
               try {
View Full Code Here

Examples of org.xmlBlaster.client.qos.EraseQos

         EraseKey ek;
         if (xpath != null)
            ek = new EraseKey(glob, xpath, Constants.XPATH);
         else
            ek = new EraseKey(glob, oid);
         EraseQos eq = new EraseQos(glob);
         eq.setForceDestroy(forceDestroy);
         eq.setPersistent(persistent);
         if (historyNumErase != -99) {
            eq.getData().setHistoryQos(new HistoryQos(glob, historyNumErase));
         }
         EraseReturnQos[] eraseArr = con.erase(ek, eq);
         for (int i=0; i < eraseArr.length; i++) {
            log.info(eraseArr[i].toXml());
         }
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.