Package org.xmlBlaster.client.qos

Examples of org.xmlBlaster.client.qos.ConnectQos.toXml()


      log.info("XmlBlaster is ready for testing");
      try {
         I_XmlBlasterAccess con = glob.getXmlBlasterAccess(); // Find orb
         String passwd = "secret";
         ConnectQos connectQos = new ConnectQos(glob, "src_" + this.subjectName, passwd); // == "<qos>...</qos>";
         if (log.isLoggable(Level.FINE)) log.fine("setUp: connectQos '" + connectQos.toXml() + "'");
         con.connect(connectQos, null)// Login to xmlBlaster, register for updates

      }
      catch (XmlBlasterException e) {
          log.warning("setUp() - login failed: " + e.getMessage());
View Full Code Here


         String loginName = glob.getProperty().get("loginName", "RMIClient");
         String passwd = glob.getProperty().get("passwd", "secret");
         ConnectQos qos = new ConnectQos(glob, loginName, passwd);
         log.info("Trying login to '" + loginName + "'");
         String retXml = authServer.connect(qos.toXml());

         // Parse the returned XML string and retrieve the secret sessionId
         ConnectReturnQos conRetQos = new ConnectReturnQos(glob, retXml);
         sessionId = conRetQos.getSecretSessionId();
View Full Code Here

      I_XmlBlasterAccess xmlBlasterAccess = new XmlBlasterAccess(nullGlobal);

      assertEquals("", false, xmlBlasterAccess.isConnected());

      ConnectQos q = new ConnectQos(null);
      log.info("Default ConnectQos=" + q.toXml() + " retries=" + q.getAddress().getRetries() + " delay=" + q.getAddress().getDelay());
      assertEquals("", -1, q.getAddress().getRetries()); // retry forever
      assertEquals("", q.getAddress().getDefaultDelay(), q.getAddress().getDelay()); // 5000L
      assertTrue("", q.getAddress().getDelay() > 0);
      /*
      xmlBlasterAccess.registerConnectionListener((I_ConnectionStateListener)null);
View Full Code Here

      // Subscribe to a message with a supplied filter
      try {
         SubscribeQos qos = new SubscribeQos(glob);

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

         subscriptionId = con.subscribe("<key oid='" + msgOidWantIllegalException + "'/>", qos.toXml()).getSubscriptionId();
         log.info("Success: Subscribe subscription-id=" + subscriptionId + " on oid="  + msgOidWantIllegalException + " done");
View Full Code Here

         SubscribeQos qos = new SubscribeQos(glob);

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

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

         subscriptionId = con.subscribe("<key oid='" + msgOidWantNPE + "'/>", qos.toXml()).getSubscriptionId();
         log.info("Success: Subscribe subscription-id=" + subscriptionId + " on oid="  + msgOidWantNPE + " done");
View Full Code Here

         log.info("Success: Subscribe subscription-id=" + subscriptionId + " on oid="  + msgOidWantException + " done");

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

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

         subscriptionId = con.subscribe("<key oid='" + msgOidNormal + "'/>", qos.toXml()).getSubscriptionId();
         log.info("Success: Subscribe subscription-id=" + subscriptionId + " on oid="  + msgOidNormal + " done");
View Full Code Here

         log.info("Success: Subscribe subscription-id=" + subscriptionId + " on oid="  + msgOidWantIllegalException + " done");

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

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

         subscriptionId = con.subscribe("<key oid='" + Constants.OID_DEAD_LETTER + "'/>", "<qos/>").getSubscriptionId();
         log.info("Success: Subscribe subscription-id=" + subscriptionId + " on oid="  + Constants.OID_DEAD_LETTER + " done");
       
View Full Code Here

      try {
         ConnectQos qos = new ConnectQos(this.glob);
         qos.addClientProperty("oneKey", "oneValue");
         qos.addClientProperty("twoKey", "twoValue");
         qos.addClientProperty("threeKey", new Integer(55));
         String literal = qos.toXml();
        
         ConnectQosSaxFactory factory = new ConnectQosSaxFactory(this.glob);
         ConnectQosData data = factory.readObject(literal);
         checkValues(data.getClientProperties());
      }
View Full Code Here

      try {
         ConnectQos qos = new ConnectQos(this.glob);
         qos.addClientProperty("oneKey", "oneValue");
         qos.addClientProperty("twoKey", "twoValue");
         qos.addClientProperty("threeKey", new Integer(55));
         String literal = qos.toXml();
        
         QueryQosSaxFactory factory = new QueryQosSaxFactory(this.glob);
         QueryQosData data = factory.readObject(literal);
         checkValues(data.getClientProperties());
      }
View Full Code Here

      try {
         senderConnection = glob.getXmlBlasterAccess(); // Find orb
         String passwd = "secret";
         ConnectQos connQos = new ConnectQos(glob, "clientProperty", passwd);
         if (log.isLoggable(Level.FINE)) log.fine("the connect qos is: " + connQos.toXml());
         senderConnection.connect(connQos, this); // Login to xmlBlaster

         // publish
         PublishKey key = new PublishKey(this.glob, "clientProp");
         PublishQos qos = new PublishQos(this.glob);
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.