Package org.xmlBlaster.client.key

Examples of org.xmlBlaster.client.key.UnSubscribeKey


         else if (action.equals(MethodName.UNSUBSCRIBE)) { // "unSubscribe"
            log.fine("unSubscribe arrived ...");
            //UnSubscribeReturnQos[] ret;

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


         else if (actionType.equals(I_XmlBlasterAccessRaw.UNSUBSCRIBE_NAME)) { // "unSubscribe"
            if (log.isLoggable(Level.FINE)) log.fine("unSubscribe arrived ...");
            UnSubscribeReturnQos[] ret;

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

   /**
    * 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);
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

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

      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

         log.severe("testSubscribeUnSubscribeEmpty() subscribe failed: " + e.getMessage());
         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

    * Unsubscribes from the alert topic.
    * @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

         this.global.unregisterMBean(this.mbeanHandle);
         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();
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");
View Full Code Here

TOP

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

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.