Package org.xmlBlaster.client.qos

Examples of org.xmlBlaster.client.qos.UnSubscribeQos


    * cleaning up .... erase() the previous message OID and logout
    */
   protected void tearDown() {
      try {
         UnSubscribeKey sk = new UnSubscribeKey(glob, this.oidExact);
         UnSubscribeQos sq = new UnSubscribeQos(glob);
         this.senderConnection.unSubscribe(sk, sq);
        
         EraseReturnQos[] arr = this.senderConnection.erase("<key oid='" + this.oidExact + "'/>", "<qos/>");
         assertEquals("Erase", 1, arr.length);
      } catch(XmlBlasterException e) { fail("Erase XmlBlasterException: " + e.getMessage()); }
View Full Code Here


   public void unSubscribeMsg() {
      log.info("unSubscribing a volatile message ...");
      try {
         // Subscribe for the volatile message
         UnSubscribeKey sk = new UnSubscribeKey(glob, subscribeReturnQos.getSubscriptionId());
         UnSubscribeQos sq = new UnSubscribeQos(glob);
         con.unSubscribe(sk.toXml(), sq.toXml());
         log.info("UnSubscribing of '" + publishOid + "' done");
      } catch(XmlBlasterException e) {
         log.severe("unSubscribe() XmlBlasterException: " + e.getMessage());
         assertTrue("unSubscribe - XmlBlasterException: " + e.getMessage(), false);
      }
View Full Code Here

      }

      try {
         // !! Here we unsubscribe with the oid instead of using the subId !!
         UnSubscribeKey uk = new UnSubscribeKey(glob, oid);
         UnSubscribeQos uq = new UnSubscribeQos(glob);
         UnSubscribeReturnQos[] urq = senderConnection.unSubscribe(uk.toXml(), uq.toXml());
         log.info("testSubscribeUnSubscribeOid() unSubscribed");
         assertEquals("Return wrong", 1, urq.length);
         assertEquals("SubId wrong", subRet.getSubscriptionId(), urq[0].getSubscriptionId());
      }
      catch (XmlBlasterException e) {
View Full Code Here

         fail("testSubscribeUnSubscribeEmpty() subscribe failed: " + e.getMessage());
      }

      try {
         UnSubscribeKey uk = new UnSubscribeKey(glob, subRet.getSubscriptionId());
         UnSubscribeQos uq = new UnSubscribeQos(glob);
         UnSubscribeReturnQos[] urq = senderConnection.unSubscribe(uk.toXml(), uq.toXml());
         log.info("testSubscribeUnSubscribeEmpty() unSubscribed");
         assertEquals("Return wrong", 1, urq.length);
         assertEquals("SubId wrong", subRet.getSubscriptionId(), urq[0].getSubscriptionId());
      }
      catch (XmlBlasterException e) {
View Full Code Here

   public void unSubscribeMsg() {
      log.info("unSubscribing a volatile message ...");
      try {
         // Subscribe for the volatile message
         UnSubscribeKey sk = new UnSubscribeKey(glob, subscribeReturnQos.getSubscriptionId());
         UnSubscribeQos sq = new UnSubscribeQos(glob);
         con.unSubscribe(sk.toXml(), sq.toXml());
         log.info("UnSubscribing of '" + publishOid + "' done");
      } catch(XmlBlasterException e) {
         log.severe("unSubscribe() XmlBlasterException: " + e.getMessage());
         assertTrue("unSubscribe - XmlBlasterException: " + e.getMessage(), false);
      }
View Full Code Here

    * @see org.xmlBlaster.contrib.dbwatcher.detector.I_AlertProducer#stopProducing
    */
   public void stopProducing() throws Exception {
      if (this.alertSubscriptionId != null) {
         UnSubscribeKey sk = new UnSubscribeKey(glob, this.alertSubscriptionId);
         UnSubscribeQos sq = new UnSubscribeQos(glob);
         this.con.unSubscribe(sk, sq);
         this.alertSubscriptionId = null;
      }
   }
View Full Code Here

         getEngineGlobal(this.global).getRequestBroker().getAuthenticate(null).removeClientListener(this);
         getEngineGlobal(this.global).getRequestBroker().removeSubscriptionListener(this);
         I_XmlBlasterAccess conn = this.global.getXmlBlasterAccess();
         if (this.sqlTopic != null) {
            UnSubscribeKey key = new UnSubscribeKey(this.global, this.sqlTopic);
            conn.unSubscribe(key, new UnSubscribeQos(this.global));
         }
         conn.disconnect(new DisconnectQos(this.global));
         this.replications.clear();
         this.replSlaveMap.clear();
         this.topicToPrefixMap.clear();
View Full Code Here

         try { Thread.sleep(1000); }
         catch( InterruptedException i) {} // wait a second to receive update()


         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);
View Full Code Here

      if (con == null) {
         if (log.isLoggable(Level.FINE)) log.fine("forwardUnSubscribe - Nothing to forward");
         return null;
      }

      return con.unSubscribe(new UnSubscribeKey(this.glob, xmlKey), new UnSubscribeQos(this.glob, unSubscribeQos.getData()));
   }
View Full Code Here

         while (it.hasNext()) {
            SubscribeReturnQos subscribeRetQos = (SubscribeReturnQos)it.next();
            try {
               UnSubscribeKey uk = new UnSubscribeKey(glob, subscribeRetQos.getSubscriptionId());
               UnSubscribeQos uq = new UnSubscribeQos(glob);
               //xmlBlasterImpl.unSubscribe(sessionId, uk.toXml(), uq.toXml());
               xmlBlasterCon.unSubscribe(uk.toXml(), uq.toXml());
            }
            catch (XmlBlasterException e) {
               log.warning("Unsubscribe failed: " + e.getMessage());
            }
         }
View Full Code Here

TOP

Related Classes of org.xmlBlaster.client.qos.UnSubscribeQos

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.