Examples of addClientProperty()


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

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

      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

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

      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

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

      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

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

               // 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

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

               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

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

               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

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

               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

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

      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

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

               QosData qosData = msgUnit.getQosData();
               Destination[] destinations = ((MsgQosData)qosData).getDestinationArr();
               if (destinations != null) {
                  long numOfTransactions = qosData.getClientProperty(NUM_OF_TRANSACTIONS, 1L);
                  // negative amount of transactions means ptp entries
                  qosData.addClientProperty(NUM_OF_TRANSACTIONS, -numOfTransactions);
                  for (int i=0; i < destinations.length; i++) {
                     String sessionId = destinations[i].getDestination().getRelativeName();
                     I_ReplSlave slave = (I_ReplSlave)this.replSlaveMap.get(sessionId);
                     if (slave != null) {
                        slave.incrementPtPEntries(numOfTransactions);
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.