Package org.activemq.message

Examples of org.activemq.message.ActiveMQStreamMessage.reset()


      assertTrue(((Byte)msg.readObject()).byteValue()==testByte);
      msg.clearBody();
     
      short testShort = 3;
      msg.writeShort(testShort);
      msg.reset();
      assertTrue(((Short)msg.readObject()).shortValue()==testShort);
      msg.clearBody();
     
      int testInt = 4;
      msg.writeInt(testInt);
View Full Code Here


      assertTrue(((Short)msg.readObject()).shortValue()==testShort);
      msg.clearBody();
     
      int testInt = 4;
      msg.writeInt(testInt);
      msg.reset();
      assertTrue(((Integer)msg.readObject()).intValue()==testInt);
      msg.clearBody();
     
      long testLong = 6l;
      msg.writeLong(testLong);
View Full Code Here

      assertTrue(((Integer)msg.readObject()).intValue()==testInt);
      msg.clearBody();
     
      long testLong = 6l;
      msg.writeLong(testLong);
      msg.reset();
      assertTrue(((Long)msg.readObject()).longValue()==testLong);
      msg.clearBody();
     
      float testFloat = 6.6f;
      msg.writeFloat(testFloat);
View Full Code Here

      assertTrue(((Long)msg.readObject()).longValue()==testLong);
      msg.clearBody();
     
      float testFloat = 6.6f;
      msg.writeFloat(testFloat);
      msg.reset();
      assertTrue(((Float)msg.readObject()).floatValue()==testFloat);
      msg.clearBody();
     
      double testDouble = 7.7d;
      msg.writeDouble(testDouble);
View Full Code Here

      assertTrue(((Float)msg.readObject()).floatValue()==testFloat);
      msg.clearBody();
     
      double testDouble = 7.7d;
      msg.writeDouble(testDouble);
      msg.reset();
      assertTrue(((Double)msg.readObject()).doubleValue()==testDouble);
      msg.clearBody();
     
      char testChar = 'z';
      msg.writeChar(testChar);
View Full Code Here

      assertTrue(((Double)msg.readObject()).doubleValue()==testDouble);
      msg.clearBody();
     
      char testChar = 'z';
      msg.writeChar(testChar);
      msg.reset();
      assertTrue(((Character)msg.readObject()).charValue()==testChar);
      msg.clearBody();
     
      byte[] data = new byte[50];
      for(int i = 0; i < data.length;i++){
View Full Code Here

      byte[] data = new byte[50];
      for(int i = 0; i < data.length;i++){
        data[i] = (byte)i;
      }
      msg.writeBytes(data);
      msg.reset();
      byte[] valid = (byte[])msg.readObject();
      assertTrue(valid.length==data.length);
      for(int i =0; i < valid.length;i++){
        assertTrue(valid[i]==data[i]);
      }
View Full Code Here

      for(int i =0; i < valid.length;i++){
        assertTrue(valid[i]==data[i]);
      }
      msg.clearBody();
      msg.writeBoolean(true);
      msg.reset();
      assertTrue(((Boolean)msg.readObject()).booleanValue());
     
     
    }catch(JMSException jmsEx){
      jmsEx.printStackTrace();
View Full Code Here

  public void testReadBoolean()
  {
    ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
    try {
      msg.writeBoolean(true);
      msg.reset();
      assertTrue(msg.readBoolean());
      msg.reset();
      assertTrue(msg.readString().equals("true"));
    }catch(JMSException jmsEx){
      jmsEx.printStackTrace();
View Full Code Here

    ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
    try {
      msg.writeBoolean(true);
      msg.reset();
      assertTrue(msg.readBoolean());
      msg.reset();
      assertTrue(msg.readString().equals("true"));
    }catch(JMSException jmsEx){
      jmsEx.printStackTrace();
      assertTrue(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.