Examples of MsgInterceptor


Examples of org.xmlBlaster.test.MsgInterceptor

         ConnectQos connectQos = new ConnectQos(glob, oneName, "secret"); // "<qos></qos>"; During login this is manipulated (callback address added)
         // If we have many subs on one con, we must raise the max size of the callback queue!
         CbQueueProperty cbProp =connectQos.getSessionCbQueueProperty();
         cbProp.setMaxEntries(numSubscribers+1000);
         cbProp.setMaxEntriesCache(numSubscribers+1000);
         this.updateInterceptor = new MsgInterceptor(this.glob, log, this); // Collect received msgs
         ConnectReturnQos connectReturnQos = oneConnection.connect(connectQos, this.updateInterceptor);
         log.info("Connected: " + connectReturnQos.toXml());
      }
      catch (Exception e) {
          log.severe("Login failed: " + e.toString());
View Full Code Here

Examples of org.xmlBlaster.test.MsgInterceptor

      this.serverThread = EmbeddedXmlBlaster.startXmlBlaster(glob);
      log.info("XmlBlaster is ready for testing the priority dispatch plugin");

      try {
         // A testsuite helper to collect update messages
         this.updateInterceptor = new MsgInterceptor(glob, log, null);

         // Connecting to server
         log.info("Connecting with XmlRpc ...");
         this.con = glob.getXmlBlasterAccess();
         this.connectQos = new ConnectQos(glob, name, passwd);
View Full Code Here

Examples of org.xmlBlaster.test.MsgInterceptor


      // Now reestablish the callback server ...
      I_CallbackServer cbServer = null;
      try {
         updateMsgs = new MsgInterceptor(glob, log, null); // just used as message container
         this.updateInterceptor.clear();
         try {
            // TODO change this since it can not work when using xmlrpc with singleChannel=true
            cbServer = new XmlRpcCallbackServer();
            CallbackAddress cbAddress = new CallbackAddress(glob);
View Full Code Here

Examples of org.xmlBlaster.test.MsgInterceptor

      try {
         this.connGlobal = this.global.getClone(null);
         // this.publisherGlobal = this.global.getClone(null);
         // this.publisherGlobal.getXmlBlasterAccess().connect(new ConnectQos(this.publisherGlobal, "one/2", "secret"), null);
        
         this.updateInterceptor = new MsgInterceptor(this.connGlobal, log, null, this);
         boolean withQueue = true;
         // we need failsafe behaviour to enable holdback messages on client update exceptions
         ConnectQos connectQos = new ConnectQos(this.connGlobal, "streamingMsgTester/1", "secret");
         connectQos.getAddress().setDelay(5000L);
         connectQos.getAddress().setPingInterval(5000L);
View Full Code Here

Examples of org.xmlBlaster.test.MsgInterceptor

         addressProp.setPingInterval(400L);   // ping every 400 milli second
         con.registerConnectionListener(this);

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

         // and do the login ...
         con.connect(connectQos, this.updateInterceptor); // Login to xmlBlaster
      }
      catch (XmlBlasterException e) {
View Full Code Here

Examples of org.xmlBlaster.test.MsgInterceptor

      try {
         this.con = glob.getXmlBlasterAccess();
         this.synchronousCache = con.createSynchronousCache(100); // remember handle to check in this test
         ConnectQos connectQos = new ConnectQos(glob);
         this.updateInterceptor = new MsgInterceptor(glob,log, null);
         this.con.connect(connectQos, this.updateInterceptor);
      }
      catch (Exception e) {
          log.severe(e.toString());
          e.printStackTrace();
View Full Code Here

Examples of org.xmlBlaster.test.MsgInterceptor

         String passwd = "secret";
         ConnectQos connectQos = new ConnectQos(glob, senderName, passwd); // == "<qos>...</qos>";
         // set the persistent connection
         connectQos.setPersistent(false);
         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());
          fail("setUp() - login fail: " + e.getMessage());
View Full Code Here

Examples of org.xmlBlaster.test.MsgInterceptor

   {
      try {
         Global firstGlob = glob.getClone(null);
         firstConnection = firstGlob.getXmlBlasterAccess(); // Find orb
         ConnectQos qos = new ConnectQos(firstGlob, firstName, passwd);
         this.updateInterceptFirst = new MsgInterceptor(firstGlob, log, null);
         firstConnection.connect(qos, this.updateInterceptFirst); // Login to xmlBlaster
      }
      catch (Exception e) {
          log.severe(e.toString());
          e.printStackTrace();
View Full Code Here

Examples of org.xmlBlaster.test.MsgInterceptor

      expectedName = secondName; // second name should be returned on this login
      try {
         Global secondGlob = glob.getClone(null);
         this.secondConnection = secondGlob.getXmlBlasterAccess(); // Find orb
         ConnectQos qos = new ConnectQos(secondGlob, secondName, passwd); // == "<qos></qos>";
         this.updateInterceptSecond = new MsgInterceptor(secondGlob, log, null);
         this.secondConnection.connect(qos, this.updateInterceptSecond); // Login to xmlBlaster
        
         // login event arrived?
         assertEquals("Missing my login event", 1, this.updateInterceptFirst.waitOnUpdate(sleep, "__sys__Login", Constants.STATE_OK));
         String eventType = this.updateInterceptFirst.getMsgs()[0].getContentStr();
View Full Code Here

Examples of org.xmlBlaster.test.MsgInterceptor

      }
   }

   private void connect() {
      try {
         this.updateInterceptor = new MsgInterceptor(this.glob, log, this);
         con = glob.getXmlBlasterAccess(); // Find orb
         ConnectQos qos = new ConnectQos(glob);
         con.connect(qos, this.updateInterceptor);
      }
      catch (Exception e) {
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.