Examples of MsgQosSaxFactory


Examples of org.xmlBlaster.util.qos.MsgQosSaxFactory

    */
   public final I_MsgQosFactory getMsgQosFactory() {
      if (this.msgQosFactory == null) {
         synchronized (this) {
            if (this.msgQosFactory == null) {
               this.msgQosFactory = new MsgQosSaxFactory(this);
            }
         }
      }
      return this.msgQosFactory;
   }
View Full Code Here

Examples of org.xmlBlaster.util.qos.MsgQosSaxFactory

       buf.appendAttributeEscaped(txt);
       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

Examples of org.xmlBlaster.util.qos.MsgQosSaxFactory

      String xml =  "<qos>\n" +
         "  <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

Examples of org.xmlBlaster.util.qos.MsgQosSaxFactory

      data.addClientProperty(prop2);
      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

Examples of org.xmlBlaster.util.qos.MsgQosSaxFactory

      String xml =  "<qos>\n" +
         "  <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());
     
     
      String val = "<BlaBla attr1='val1' attr2=' val2 '> Something </BlaBla>";
      prop = new ClientProperty("StringKey", null, Constants.ENCODING_FORCE_PLAIN, val);
      System.out.println(prop.toXml());

      xml =  "<qos>\n" +
      "  <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" +
      "  <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

Examples of org.xmlBlaster.util.qos.MsgQosSaxFactory

      String txt = prop.getProperty("qosTest", null);
      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);
   }
View Full Code Here

Examples of org.xmlBlaster.util.qos.MsgQosSaxFactory

            "      <node id='frodo' stratum='1' timestamp='9408630538' dirtyRead='false'/>\n" +
            "      <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

Examples of org.xmlBlaster.util.qos.MsgQosSaxFactory

            "      <persistence relating='msgUnitStore' type='TO' version='3.0' maxEntries='4' maxBytes='40' onOverflow='deadMessage'/>\n" +
            "      <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);

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

Examples of org.xmlBlaster.util.qos.MsgQosSaxFactory

         String xml =
            "<qos>\n" +
            "   <rcvTimestamp nanos='" + timestamp.getTimestamp() + "'/>\n" + // if from persistent store
            "</qos>\n";

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

         assertEquals("", timestamp.getTimestamp(), qos.getRcvTimestamp().getTimestamp());
      }
      catch (XmlBlasterException e) {
         fail("testFromPersistentStore failed: " + e.toString());
View Full Code Here

Examples of org.xmlBlaster.util.qos.MsgQosSaxFactory

    */
   public void testDefault() {
      System.out.println("***MsgQosFactoryTest: testDefault ...");
     
      try {
         MsgQosSaxFactory factory = new MsgQosSaxFactory(glob);
         MsgQosData qos = factory.readObject((String)null);
         //qos.addRouteInfo(new RouteInfo(new NodeId("master"), 0, new Timestamp(9408630587L)));
         assertEquals("", true, qos.isSubscribable());
         assertEquals("", false, qos.isPtp());
         assertEquals("", false, qos.isVolatile());
         assertEquals("", false, qos.isAdministrative());
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.