Package org.xmlBlaster.util.qos

Examples of org.xmlBlaster.util.qos.MsgQosSaxFactory.readObject()


       buf.append("'/>");
       buf.append("</qos>");
       String xml = buf.toString();
       System.out.println(xml);
       MsgQosSaxFactory f = new MsgQosSaxFactory(Global.instance());
       MsgQosData data = f.readObject(xml);
       System.out.println(data.getSubscriptionId());
      
       buf = new XmlBuffer(256);
       buf.appendAttributeEscaped(txt);
       String tmp = buf.toString();
View Full Code Here


         "  <isPublish/>\n" +
         "  <clientProperty name='StringKey' type=''><![CDATA[Bla<BlaBla]]></clientProperty>\n" +
         "</qos>";     
     
      MsgQosSaxFactory parser = new MsgQosSaxFactory(this.glob);
      MsgQosData data = parser.readObject(xml);
      ClientProperty prop = data.getClientProperty("StringKey");
      System.out.println(prop.toXml());
      assertEquals("", true, prop.isBase64());
     
   }
View Full Code Here

      data.addClientProperty(prop3);
      data.addClientProperty(prop4);
      String xml = data.toXml();
      System.out.println("The content of the qos is '" + xml + "'");
      MsgQosSaxFactory parser = new MsgQosSaxFactory(this.glob);
      MsgQosData data1 = parser.readObject(xml);
      assertEquals(name1, val1, data1.getClientProperty(name1).getStringValue());
      assertEquals(name2, val2, data1.getClientProperty(name2).getStringValue());
      assertEquals(name3, val3, data1.getClientProperty(name3).getStringValue());
      assertEquals(name4, val4, data1.getClientProperty(name4).getStringValue());
     
View Full Code Here

         "  <isPublish/>\n" +
         "  <clientProperty name='StringKey' type=''><BlaBla attr1='val1' attr2=' val2 '> Something </BlaBla></clientProperty>\n" +
         "</qos>";     
     
      MsgQosSaxFactory parser = new MsgQosSaxFactory(this.glob);
      MsgQosData data = parser.readObject(xml);
      ClientProperty prop = data.getClientProperty("StringKey");
      System.out.println(prop.toXml());
      // assertEquals("", true, prop.isBase64());
     
     
View Full Code Here

      "  <isPublish/>\n" +
      "  <clientProperty name='StringKey' type='' encoding='forcePlain'><qos attr1='val1' attr2=' val2 '> Something </qos></clientProperty>\n" +
      "</qos>";     
     
      parser = new MsgQosSaxFactory(this.glob);
      data = parser.readObject(xml);
      prop = data.getClientProperty("StringKey");
      System.out.println(prop.toXml());
     
      xml =  "<qos>\n" +
      "  <isPublish/>\n" +
View Full Code Here

      "  <isPublish/>\n" +
      "  <clientProperty name='StringKey' type='' encoding='forcePlain'><clientProperty name='aaa' type='' encoding=''>Something</clientProperty></clientProperty>\n" +
      "</qos>";     
     
      parser = new MsgQosSaxFactory(this.glob);
      data = parser.readObject(xml);
      prop = data.getClientProperty("StringKey");
      System.out.println(prop.toXml());
     
      System.out.println("END");
   }
View Full Code Here

      if (txt == null) {
         prop.list(System.err);
         assertTrue("the qosTest is null when it should not", false);
      }
      MsgQosSaxFactory msgFactory = new MsgQosSaxFactory(this.glob);
      return msgFactory.readObject(txt);
   }

   public void testPluginConfigParser() {
      log.info("start");
      String xml = "<![CDATA[<qos><expiration lifeTime='4000'/></qos>]]>";
View Full Code Here

            "      <node id='heron' stratum='0' timestamp='9408630564'/>\n" +
            "   </route>\n" +
            "</qos>\n";

         MsgQosSaxFactory factory = new MsgQosSaxFactory(glob);
         MsgQosData qos = factory.readObject(xml);

         assertEquals("", "AA", qos.getState());
         assertEquals("", "SOMETHING", qos.getStateInfo());
         assertEquals("", true, qos.isPtp());
         assertEquals("", true, qos.isAdministrative());
View Full Code Here

            "      <queue relating='history' type='HI' version='2.0' maxEntries='3' maxBytes='30' onOverflow='deadMessage'/>\n" +
            "   </topic>\n" +
            "</qos>\n";

         MsgQosSaxFactory factory = new MsgQosSaxFactory(glob);
         MsgQosData qos = factory.readObject(xml);
         String newXml = qos.toXml();
         log.info("lifeTime=" + qos.getLifeTimeProp().toXml());
         log.info("New XML=" + newXml);
         qos = factory.readObject(newXml);
View Full Code Here

         MsgQosSaxFactory factory = new MsgQosSaxFactory(glob);
         MsgQosData qos = factory.readObject(xml);
         String newXml = qos.toXml();
         log.info("lifeTime=" + qos.getLifeTimeProp().toXml());
         log.info("New XML=" + newXml);
         qos = factory.readObject(newXml);

         assertEquals("", "AA", qos.getState());
         assertEquals("", "SOMETHING", qos.getStateInfo());
         assertEquals("", true, qos.isPtp());
         assertEquals("", false, qos.isVolatile());
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.