Examples of SubscribeQos


Examples of org.xmlBlaster.client.qos.SubscribeQos

    */
   private void doSubscribe(I_XmlBlasterAccess con) {
      if (log.isLoggable(Level.FINE)) log.fine("Subscribing using EXACT oid syntax ...");
      try {
         SubscribeKey subscribeKey = new SubscribeKey(con.getGlobal(), this.oid);
         SubscribeQos subscribeQos = new SubscribeQos(con.getGlobal());
         String subscribeOid = con.subscribe(subscribeKey, subscribeQos).getSubscriptionId();
         log.info("Success: Subscribe on " + subscribeOid + " done");
         assertTrue("returned null subscribeOid", subscribeOid != null);
      } catch(XmlBlasterException e) {
         log.severe("XmlBlasterException: " + e.getMessage());
View Full Code Here

Examples of org.xmlBlaster.client.qos.SubscribeQos

    */
   private void doSubscribe(I_XmlBlasterAccess con) {
      if (log.isLoggable(Level.FINE)) log.fine("Subscribing using EXACT oid syntax ...");
      try {
         SubscribeKey subscribeKey = new SubscribeKey(con.getGlobal(), this.oid);
         SubscribeQos subscribeQos = new SubscribeQos(con.getGlobal());
         String subscribeOid = con.subscribe(subscribeKey, subscribeQos).getSubscriptionId();
         log.info("Success: Subscribe on " + subscribeOid + " done");
         assertTrue("returned null subscribeOid", subscribeOid != null);
      } catch(XmlBlasterException e) {
         log.severe("XmlBlasterException: " + e.getMessage());
View Full Code Here

Examples of org.xmlBlaster.client.qos.SubscribeQos

   public void subscribe() {
      if (log.isLoggable(Level.FINE)) log.fine("Subscribing ...");
      try {
         {
            SubscribeKey key = new SubscribeKey(glob, publishOid);
            SubscribeQos qos = new SubscribeQos(glob);
            qos.setWantLocal(false);
            this.updateInterceptor1 = new MsgInterceptor(glob, log, null); // Collect received msgs
            SubscribeReturnQos ret = this.connection.subscribe(key.toXml(), qos.toXml(), this.updateInterceptor1);
            subscribeId1 = ret.getSubscriptionId();
         }
         {
            SubscribeKey key = new SubscribeKey(glob, publishOid);
            SubscribeQos qos = new SubscribeQos(glob);
            qos.setWantLocal(true);
            this.updateInterceptor2 = new MsgInterceptor(glob, log, null); // Collect received msgs
            SubscribeReturnQos ret = connection.subscribe(key.toXml(), qos.toXml(), this.updateInterceptor2);
            subscribeId2 = ret.getSubscriptionId();
         }
      } catch(XmlBlasterException e) {
         log.warning("XmlBlasterException: " + e.getMessage());
         fail("subscribe - XmlBlasterException: " + e.getMessage());
View Full Code Here

Examples of org.xmlBlaster.client.qos.SubscribeQos

         log.severe("Can't connect to xmlBlaster: " + e.toString());
      }

      // Subscribe to a message with a supplied filter
      try {
         SubscribeQos qos = new SubscribeQos(glob);
         qos.addAccessFilter(new AccessFilterQos(glob, "ContentLenFilter", "1.0", ""+filterMessageContentBiggerAs));

         String subscribeOid = con.subscribe("<key oid='MSG'/>", qos.toXml()).getSubscriptionId();
         log.info("Success: Subscribe subscription-id=" + subscribeOid + " done");

         con.subscribe("<key oid='" + Constants.OID_DEAD_LETTER + "'/>", "<qos/>");
       
      } catch(XmlBlasterException e) {
View Full Code Here

Examples of org.xmlBlaster.client.qos.SubscribeQos

   }

   private void subscribe(boolean wantNotify) {
      try {
         SubscribeKey sk = new SubscribeKey(this.glob, this.publishOid);
         SubscribeQos sq = new SubscribeQos(this.glob);
         sq.setWantNotify(wantNotify);
         this.senderConnection.subscribe(sk, sq);
      } catch(XmlBlasterException e) { fail("Subscribe XmlBlasterException: " + e.getMessage()); }
   }
View Full Code Here

Examples of org.xmlBlaster.client.qos.SubscribeQos

      */
      try {
         this.connGlobal = this.global.getClone(null);
         this.updateInterceptor = new MsgInterceptor(this.connGlobal, log, null);
         this.connGlobal.getXmlBlasterAccess().connect(new ConnectQos(this.connGlobal), this.updateInterceptor);
         SubscribeQos subQos = new SubscribeQos(this.connGlobal);
         subQos.setWantInitialUpdate(false);
         this.connGlobal.getXmlBlasterAccess().subscribe(new SubscribeKey(this.connGlobal, this.oid), subQos);
      }
      catch (XmlBlasterException ex) {
         ex.printStackTrace();
         fail("aborting since exception ex: " + ex.getMessage());
View Full Code Here

Examples of org.xmlBlaster.client.qos.SubscribeQos

         // Expecting actionType = "cpuinfo" or "meminfo" but it could be
         // any valid key oid.
         log.info("Got request for " + actionType + ", sessionId=" + sessionId + " ...");

         SubscribeKey xmlKey = new SubscribeKey(null, actionType);
         SubscribeQos xmlQos = new SubscribeQos(null);

         String ret = corbaConnection.subscribe(xmlKey.toXml(), xmlQos.toXml()).getSubscriptionId();
         log.info("Subscribed to " + actionType + "=" + ret);

         // NOTE: The callback messages (update()) are handled by our
         // BlasterHttpProxyServlet framework and pushed to the browser.
         // Typically a browser (or applet) can subscribe itself directly at BlasterHttpProxyServlet
View Full Code Here

Examples of org.xmlBlaster.client.qos.SubscribeQos

   }

   private void subscribe(String oid) {
      try {
         SubscribeKey sk = new SubscribeKey(glob, oid);
         SubscribeQos sq = new SubscribeQos(glob);
         SubscribeReturnQos srq = con.subscribe(sk.toXml(), sq.toXml());
         log.info("SUCCESS subscribe to '" + oid + "' returned state=" + srq.getState());
      } catch(XmlBlasterException e) {
         log.warning("XmlBlasterException: " + e.getMessage());
         fail("subscribe - XmlBlasterException: " + e.getMessage());
      }
View Full Code Here

Examples of org.xmlBlaster.client.qos.SubscribeQos

            //   "   /xmlBlaster/key/ClientSub-AGENT" +
            //   "</key>";
            SubscribeKey key = new SubscribeKey(glob, "/xmlBlaster/key/ClientSub-AGENT", "XPATH");

            // SubscribeKey helps us to create "<qos></qos>":
            SubscribeQos qos = new SubscribeQos(glob);

            try {
               subscriptionId = blasterConnection.subscribe(key.toXml(), qos.toXml()).getSubscriptionId();
               log.info("Subscribe done, there should be no Callback, subcriptionId=" + subscriptionId);
            } catch(XmlBlasterException e) {
               log.warning("XmlBlasterException: " + e.getMessage());
            }
         }
View Full Code Here

Examples of org.xmlBlaster.client.qos.SubscribeQos

         String passwd = "secret";
        
         SubscribeKey subKeyW = new SubscribeKey(glob, publishOid1);
         String subKey = subKeyW.toXml(); // "<key oid='" + publishOid1 + "' queryType='EXACT'></key>";
        
         SubscribeQos subQosW = new SubscribeQos(glob); // "<qos></qos>";
         String subQos = subQosW.toXml();
        
         manyClients = new Client[numSubscribers];
         if (maxSubPerCon >0 ) {
            // Check if reasonably
            if numSubscribers %  maxSubPerCon!= 0) {
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.