Examples of MsgInterceptor


Examples of org.xmlBlaster.test.MsgInterceptor

    * @param arg0
    */
   public TestReplication(String arg0) {
      super(arg0);
      XMLUnit.setIgnoreWhitespace(true);
      this.interceptor = new MsgInterceptor(new Global(), log, null, (I_Update)null);
   }
View Full Code Here

Examples of org.xmlBlaster.test.MsgInterceptor

   protected void setUp() {
      this.subscribeId = null;
      try {
         connection = glob.getXmlBlasterAccess(); // Find orb
         ConnectQos qos = new ConnectQos(glob);
         this.updateInterceptor = new MsgInterceptor(glob,log, null);
         connection.connect(qos, this.updateInterceptor);
      }
      catch (Exception e) {
          log.severe("Login failed: " + e.toString());
          e.printStackTrace();
View Full Code Here

Examples of org.xmlBlaster.test.MsgInterceptor

         CallbackAddress cbAddress = new CallbackAddress(glob);
         cbAddress.setRetries(-1);       // -1 == forever to avoid server side clearing of queue
         connectQos.addCallbackAddress(cbAddress);
         client.con = gg.getXmlBlasterAccess();
         client.con.registerConnectionListener(this);
         client.updateInterceptor = new MsgInterceptor(gg, log, cb); // Collect received msgs
         client.con.connect(connectQos, client.updateInterceptor); // Login to xmlBlaster
         return client;
      }
      catch (XmlBlasterException e) {
         log.warning("doConnect() - login failed: " + e.getMessage());
View Full Code Here

Examples of org.xmlBlaster.test.MsgInterceptor

         CallbackAddress cbAddress = new CallbackAddress(glob);
         cbAddress.setRetries(-1);       // -1 == forever to avoid server side clearing of queue
         connectQos.addCallbackAddress(cbAddress);
         client.con = gg.getXmlBlasterAccess();
         client.con.registerConnectionListener(this);
         client.updateInterceptor = new MsgInterceptor(gg, log, cb); // Collect received msgs
         client.con.connect(connectQos, client.updateInterceptor); // Login to xmlBlaster
         return client;
      }
      catch (XmlBlasterException e) {
         log.warning("doConnect() - login failed: " + e.getMessage());
View Full Code Here

Examples of org.xmlBlaster.test.MsgInterceptor

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

Examples of org.xmlBlaster.test.MsgInterceptor

    */
   protected void setUp() {
      try {
         this.senderConnection = glob.getXmlBlasterAccess();
         String passwd = "secret";
         this.msgInterceptor = new MsgInterceptor(this.glob, log, null);
         this.msgInterceptor.countErased(true); // count erased() notifications as well
         this.senderConnection.connect(new ConnectQos(glob, senderName, passwd), this.msgInterceptor); // Login to xmlBlaster
      }
      catch (Exception e) {
         e.printStackTrace();
View Full Code Here

Examples of org.xmlBlaster.test.MsgInterceptor

      if (file.exists())
         FileLocator.deleteDir(file);
      */
      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);
      }
View Full Code Here

Examples of org.xmlBlaster.test.MsgInterceptor

         SubscribeQos qos = new SubscribeQos(this.glob); // "<qos><persistent>true</persistent></qos>";
         qos.setPersistent(isPersistent);
         qos.setWantInitialUpdate(this.initialUpdates);
         qos.setWantNotify(false); // to avoig getting erased messages

         this.updateInterceptors[num] = new MsgInterceptor(this.glob, log, null); // Collect received msgs
         this.updateInterceptors[num].setLogPrefix("interceptor-" + num);
         SubscribeReturnQos subscriptionId = this.glob.getXmlBlasterAccess().subscribe(key, qos, this.updateInterceptors[num]);

         log.info("Success: Subscribe on subscriptionId=" + subscriptionId.getSubscriptionId() + " done");
         assertTrue("returned null subscriptionId", subscriptionId != null);
View Full Code Here

Examples of org.xmlBlaster.test.MsgInterceptor

         addressProp.setPingInterval(-1L); // switched off
         con.registerConnectionListener(this);

         connectQos.setAddress(addressProp);

         this.updateInterceptor = new MsgInterceptor(this.glob, log, null); // Collect received msgs

         con.connect(connectQos, this.updateInterceptor)// Login to xmlBlaster, register for updates
      }
      catch (XmlBlasterException e) {
          log.warning("setUp() - login failed: " + e.getMessage());
View Full Code Here

Examples of org.xmlBlaster.test.MsgInterceptor

         ConnectQos qos = new ConnectQos(glob, name, passwd);
         CallbackAddress cbAddress = new CallbackAddress(glob);
         cbAddress.setDispatchPlugin("Priority,1.0");
         qos.addCallbackAddress(cbAddress);

         this.update = new MsgInterceptor(glob, log, null);
         this.con.connect(qos, update);
      }
      catch (Exception e) {
         Thread.dumpStack();
         log.severe("Can't connect to xmlBlaster: " + e.toString());
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.