Package org.xmlBlaster.util.qos

Examples of org.xmlBlaster.util.qos.MsgQosData.addClientProperty()


      String val4 = " val4 ";
      ClientProperty prop1 = new ClientProperty(name1, null, null, val1);
      ClientProperty prop2 = new ClientProperty(name2, null, null, val2);
      ClientProperty prop3 = new ClientProperty(name3, null, null, val3);
      ClientProperty prop4 = new ClientProperty(name4, null, null, val4);
      data.addClientProperty(prop1);
      data.addClientProperty(prop2);
      data.addClientProperty(prop3);
      data.addClientProperty(prop4);
      String xml = data.toXml();
      System.out.println("The content of the qos is '" + xml + "'");
View Full Code Here


      ClientProperty prop1 = new ClientProperty(name1, null, null, val1);
      ClientProperty prop2 = new ClientProperty(name2, null, null, val2);
      ClientProperty prop3 = new ClientProperty(name3, null, null, val3);
      ClientProperty prop4 = new ClientProperty(name4, null, null, val4);
      data.addClientProperty(prop1);
      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);
View Full Code Here

      ClientProperty prop2 = new ClientProperty(name2, null, null, val2);
      ClientProperty prop3 = new ClientProperty(name3, null, null, val3);
      ClientProperty prop4 = new ClientProperty(name4, null, null, val4);
      data.addClientProperty(prop1);
      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);
View Full Code Here

      ClientProperty prop3 = new ClientProperty(name3, null, null, val3);
      ClientProperty prop4 = new ClientProperty(name4, null, null, val4);
      data.addClientProperty(prop1);
      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());
View Full Code Here

               // log.warning("Not implemented yet: the size '" + infos[i].getSize() + "' is bigger than the maximum chunk size (" + maximumChunkSize + ")");
               InputStream is = directoryManager.getContentStream(infos[i]);
               Global glob = access.getGlobal();
               MsgKeyData keyData = glob.getMsgKeyFactory().readObject(publishKey);
               MsgQosData qosData = glob.getMsgQosFactory().readObject(publishQos);
               qosData.addClientProperty(ContribConstants.FILENAME_ATTR, infos[i].getRelativeName());
               qosData.addClientProperty(ContribConstants.FILE_DATE, infos[i].getTimestamp());
               qosData.addClientProperty(Constants.addJmsPrefix(XBConnectionMetaData.JMSX_MAX_CHUNK_SIZE, log), maximumChunkSize);
               String subDir = directoryManager.getSubDir();
               if (subDir != null)
                  qosData.addClientProperty(ContribConstants.SUBDIR_ATTR, subDir);
View Full Code Here

               InputStream is = directoryManager.getContentStream(infos[i]);
               Global glob = access.getGlobal();
               MsgKeyData keyData = glob.getMsgKeyFactory().readObject(publishKey);
               MsgQosData qosData = glob.getMsgQosFactory().readObject(publishQos);
               qosData.addClientProperty(ContribConstants.FILENAME_ATTR, infos[i].getRelativeName());
               qosData.addClientProperty(ContribConstants.FILE_DATE, infos[i].getTimestamp());
               qosData.addClientProperty(Constants.addJmsPrefix(XBConnectionMetaData.JMSX_MAX_CHUNK_SIZE, log), maximumChunkSize);
               String subDir = directoryManager.getSubDir();
               if (subDir != null)
                  qosData.addClientProperty(ContribConstants.SUBDIR_ATTR, subDir);
               access.publishStream(is, keyData, qosData, maximumChunkSize, replSourceEngine);
View Full Code Here

               Global glob = access.getGlobal();
               MsgKeyData keyData = glob.getMsgKeyFactory().readObject(publishKey);
               MsgQosData qosData = glob.getMsgQosFactory().readObject(publishQos);
               qosData.addClientProperty(ContribConstants.FILENAME_ATTR, infos[i].getRelativeName());
               qosData.addClientProperty(ContribConstants.FILE_DATE, infos[i].getTimestamp());
               qosData.addClientProperty(Constants.addJmsPrefix(XBConnectionMetaData.JMSX_MAX_CHUNK_SIZE, log), maximumChunkSize);
               String subDir = directoryManager.getSubDir();
               if (subDir != null)
                  qosData.addClientProperty(ContribConstants.SUBDIR_ATTR, subDir);
               access.publishStream(is, keyData, qosData, maximumChunkSize, replSourceEngine);
               if (log.isLoggable(Level.FINE))
View Full Code Here

               qosData.addClientProperty(ContribConstants.FILENAME_ATTR, infos[i].getRelativeName());
               qosData.addClientProperty(ContribConstants.FILE_DATE, infos[i].getTimestamp());
               qosData.addClientProperty(Constants.addJmsPrefix(XBConnectionMetaData.JMSX_MAX_CHUNK_SIZE, log), maximumChunkSize);
               String subDir = directoryManager.getSubDir();
               if (subDir != null)
                  qosData.addClientProperty(ContribConstants.SUBDIR_ATTR, subDir);
               access.publishStream(is, keyData, qosData, maximumChunkSize, replSourceEngine);
               if (log.isLoggable(Level.FINE))
                  log.fine(ME+": Successfully published file " + infos[i].getRelativeName() + " with size=" +infos[i].getSize());
            }
            else if (infos[i].getSize() > Integer.MAX_VALUE) {
View Full Code Here

      qos.setState("AA");
      assertEquals("state", "AA", qos.getState());

      ClientProperty cp = new ClientProperty("aKey", "byte[]", Constants.ENCODING_BASE64, "bla");
      qos.addClientProperty(cp);
      Hashtable jxPath = qos.toJXPath();
      String value = (String)jxPath.get("/qos/clientProperty[@name='aKey']/text()");
      String bla = Base64.encode("bla".getBytes());
      assertEquals("JXPATH", bla, value);
      String type = (String)jxPath.get("/qos/clientProperty[@name='aKey']/@type");
View Full Code Here

            topicProperty.setHistoryQueueProperty(historyQueueProperty);
            publishQos.setTopicProperty(topicProperty);
            msgQosData = publishQos.getData();
         }
         if (summary != null && summary.length() > 0)
            msgQosData.addClientProperty(Constants.EVENTPLUGIN_PROP_SUMMARY, summary); // "_summary"
         if (description != null && description.length() > 0)
            msgQosData.addClientProperty(Constants.EVENTPLUGIN_PROP_DESCRIPTION, description);
         if (eventType != null && eventType.length() > 0)
            msgQosData.addClientProperty(Constants.EVENTPLUGIN_PROP_EVENTTYPE, eventType);
         if (errorCode != null && errorCode.length() > 0)
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.