Examples of XBMessage


Examples of org.xmlBlaster.jms.XBMessage

    */
   public void testPropertyValueConversion() {
      try {
         byte[] content = null;
         int type = XBMessage.TEXT;
         XBMessage msg = new XBMessage(null, content, type);

         String[] keys = new String[] {"Boolean", "Byte", "Short", "Int", "Long", "Float", "Double", "String"};
         Object[] values = new Object[] { new Boolean(false), new Byte((byte)1), new Short((short)2), new Integer(3), new Long(4), new Float(5.01), new Double(6.02), new String("7 String")  };
        
         msg.setBooleanProperty(keys[0], false);
         msg.setByteProperty(keys[1], (byte)1);
         msg.setShortProperty(keys[2], (short)2);
         msg.setIntProperty(keys[3], (int)3);
         msg.setLongProperty(keys[4], (long)4);
         msg.setFloatProperty(keys[5], (float)5.01);
         msg.setDoubleProperty(keys[6], (double)6.02);
         msg.setStringProperty(keys[7], "7 (String)");

         // prepare the result matrix (all others should  be false)
         boolean[][] allowed = new boolean[8][8];
         for (int j=0; j < 8; j++) {
            for (int i=0; i < 8; i++) allowed[j][i] = false;
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.