Package org.xmlBlaster.client.key

Examples of org.xmlBlaster.client.key.EraseKey


         else if (action.equals(MethodName.ERASE)) { // "erase"
            log.fine("erase arrived ...");
            //EraseReturnQos[] ret;

            if (oid != null) {
               EraseKey ek = new EraseKey(glob, oid);
               /*ret =*/ xmlBlaster.erase(ek.toXml(), qos);
            }
            else if (key != null) {
               /*ret =*/ xmlBlaster.erase(key, qos);
            }
            else {
View Full Code Here


         else if (actionType.equals(I_XmlBlasterAccessRaw.ERASE_NAME)) { // "erase"
            if (log.isLoggable(Level.FINE)) log.fine("erase arrived ...");
            EraseReturnQos[] ret;

            if (oid != null) {
               EraseKey ek = new EraseKey(glob, oid);
               ret = xmlBlaster.erase(ek.toXml(), qos);
            }
            else if (key != null) {
               ret = xmlBlaster.erase(key, qos);
            }
            else {
View Full Code Here

   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

    * Tear down the fixture, erase messages and disconnect from xmlBlaster.
    */
   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

   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

         if (log.isLoggable(Level.FINE)) log.fine("Published '" + prq.getKeyOid() + "' '" + id + "'");
         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";
      }
View Full Code Here

            }
            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

         UnSubscribeKey uk = new UnSubscribeKey(glob, subRet.getSubscriptionId());
         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);
View Full Code Here

            if (interactive) {
               ret = (char)Global.waitOnKeyboardHit("Hit 'e' to erase topic '"+oid+"', or any other key to keep the topic");
            }

            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

    * @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

TOP

Related Classes of org.xmlBlaster.client.key.EraseKey

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.