Package org.xmlBlaster.client.key

Examples of org.xmlBlaster.client.key.EraseKey


      this.senderConnection.disconnect(null);
   }

   private void erase() {
      try {
         EraseKey ek = new EraseKey(this.glob, this.publishOid);
         EraseQos eq = new EraseQos(this.glob);
         EraseReturnQos[] arr = this.senderConnection.erase(ek, eq);
         assertEquals("Erase", 1, arr.length);
      } catch(XmlBlasterException e) { fail("Erase XmlBlasterException: " + e.getMessage()); }
   }
View Full Code Here


    */
   protected void tearDown() {
      log.info("Entering tearDown(), test is finished");
      I_XmlBlasterAccess con = this.glob.getXmlBlasterAccess();
      try {
         EraseKey key = new EraseKey(this.glob, "testPtPDispatch");
         EraseQos qos = new EraseQos(this.glob);
         con.erase(key, qos);
      }
      catch(XmlBlasterException ex) {
         ex.printStackTrace();
View Full Code Here

            UnSubscribeKey uk = new UnSubscribeKey(con.getGlobal(), subRet.getSubscriptionId());
            UnSubscribeQos uq = new UnSubscribeQos(con.getGlobal());
            UnSubscribeReturnQos[] urq = con.unSubscribe(uk.toXml(), uq.toXml());

            EraseKey ek = new EraseKey(con.getGlobal(), "AllProtocols");
            EraseQos eq = new EraseQos(con.getGlobal());
            EraseReturnQos[] eraseArr = con.erase(ek.toXml(), eq.toXml());

            DisconnectQos dq = new DisconnectQos(con.getGlobal());
            con.disconnect(dq);
         }
         catch (XmlBlasterException e) {
View Full Code Here

      try {
         EraseQos eq = new EraseQos(glob);
         // !!!! NOTE: if force destroy is true the erase event may not
         // come through and the cache is not cleared !!! How to relove?
         eq.setForceDestroy(false);
         EraseKey ek = new EraseKey(glob, publishOid);
         EraseReturnQos[] er = con.erase(ek, eq);
         // Wait 200 milli seconds, until erase event is processed and cache is cleared ...
         try { Thread.sleep(200L); } catch( InterruptedException i) {}
         return er;
      } catch(XmlBlasterException e) {
View Full Code Here

      doGet("historyZeroB", 0);
      doGet("historyZeroC", 1);
      doGet("historyZeroD", 2);
      doGet("historyZeroE", 2);
      try {
         EraseKey eraseKey = new EraseKey(this.glob, "//TestHistoryZero-AGENT", "XPATH");
         EraseQos eraseQos = new EraseQos(this.glob);
         this.glob.getXmlBlasterAccess().erase(eraseKey, eraseQos);
      }
      catch (XmlBlasterException e) {
         e.printStackTrace();
View Full Code Here

         // subscribe
         senderConnection.subscribe(new SubscribeKey(this.glob, "clientProp"), new SubscribeQos(this.glob));

         waitOnUpdate(10000);

         senderConnection.erase(new EraseKey(this.glob, "clientProperty"), new EraseQos(this.glob));
         senderConnection.disconnect(new DisconnectQos(this.glob));
        
      }
      catch (Exception e) {
          log.severe("Login failed: " + e.toString());
View Full Code Here

            updateCounterBilbo = 0;
            updateCounterBilbo2 = 0;
         }

         System.err.println("->Trying to erase the message at the slave node ...");
         EraseKey ek = new EraseKey(glob, oid);
         ek.setDomain(domain);
         EraseQos eq = new EraseQos(glob);
         EraseReturnQos[] arr = avalonCon.erase(ek.toXml(), eq.toXml());
         assertEquals("Erase", 1, arr.length);
      }
      catch (XmlBlasterException e) {
         e.printStackTrace();
         fail("SubscribeToBilbo-Exception: " + e.toString());
View Full Code Here

            if (1 != updateCounterBilbo) log.severe("Did not expect " + updateCounterBilbo + " updates");
            assertEquals("message from avalon", 1, updateCounterBilbo);
            updateCounterBilbo = 0;

            System.err.println("->Trying to erase the message at the slave node ...");
            EraseKey ek = new EraseKey(glob, oid);
            ek.setDomain(domain);
            EraseQos eq = new EraseQos(glob);
            EraseReturnQos[] arr = avalonCon.erase(ek.toXml(), eq.toXml());
            assertEquals("Erase", 1, arr.length);

            // Wait on erase events
            try { Thread.sleep(1000); } catch( InterruptedException i) {}
            updateCounterBilbo = 0;
View Full Code Here

         System.err.println("->Trying to unSubscribe ...");
         bilboCon.unSubscribe("<key oid='" + srq.getSubscriptionId() + "'/>", null);

         System.err.println("->Trying to erase the message at the slave node ...");
         EraseKey ek = new EraseKey(glob, oid);
         ek.setDomain(domain);
         EraseQos eq = new EraseQos(glob);
         EraseReturnQos[] arr = avalonCon.erase(ek.toXml(), eq.toXml());
         assertEquals("Erase", 1, arr.length);
      }
      catch (XmlBlasterException e) {
         e.printStackTrace();
         fail("SubscribeToBilbo-Exception: " + e.toString());
View Full Code Here

    * Erase the message.
    */
   private void doErase(I_XmlBlasterAccess con) {
      log.info("Erasing " + this.oid + " ...");
      try {
         EraseKey eraseKey = new EraseKey(con.getGlobal(), this.oid);
         EraseQos eraseQos = new EraseQos(con.getGlobal());
         eraseQos.setForceDestroy(true);
         EraseReturnQos[] arr = con.erase(eraseKey, eraseQos);
      }
      catch(XmlBlasterException e) {
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.