Package javax.jms

Examples of javax.jms.StreamMessage.readBoolean()


      queueProducer.send(queue, m);

      StreamMessage m2 = (StreamMessage) queueConsumer.receive(2000);

      assertEquals(myBool, m2.readBoolean());
      assertEquals(myByte, m2.readByte());
      assertEquals(myShort, m2.readShort());
      assertEquals(myChar, m2.readChar());
      assertEquals(myInt, m2.readInt());
      assertEquals(myLong, m2.readLong());
View Full Code Here


      StreamMessage sm = (StreamMessage)m;

      sm.reset();

      assertEquals(true, sm.readBoolean());
      assertEquals((byte)3, sm.readByte());
      byte[] bytes = new byte[3];
      sm.readBytes(bytes);
      assertEquals((byte)4, bytes[0]);
      assertEquals((byte)5, bytes[1]);
View Full Code Here

    {
        super.assertEquivalent(m,mode);
       
        StreamMessage sm = (StreamMessage)m;
       
        assertTrue(sm.readBoolean());
       
        byte bytes[] = new byte[5];
        sm.readBytes(bytes);
        String s = new String(bytes);
        assertEquals("jboss",s);
View Full Code Here

          assertEquals(-1,msg.readBytes(data2));
          for(int k=0;k<data2.length;k++)
            data2[k] = (byte)k;
        }
       
        assertEquals(true,msg.readBoolean());
        assertEquals((byte)12,msg.readByte());
        assertEquals('a',msg.readChar());
        assertEquals(1.23456789,msg.readDouble(),0.0000001);
        assertEquals(4.5678f,msg.readFloat(),0.000001);
        assertEquals(1234,msg.readInt());
View Full Code Here

            StreamMessage receivedStreamMessage = (StreamMessage) receivedMessage;

            int numElements = 0;
            try {
                while (true) {
                    receivedStreamMessage.readBoolean();
                    numElements++;
                }
            } catch (Exception ex) {
            }
View Full Code Here

            //Ok
         }
        
         try
         {
            received.readBoolean();
           
            fail("Should throw exception");
         }
         catch (MessageEOFException e)
         {
View Full Code Here

   {
      super.assertEquivalent(m, mode, redelivery);

      StreamMessage sm = (StreamMessage)m;

      ProxyAssertSupport.assertTrue(sm.readBoolean());

      byte bytes[] = new byte[5];
      sm.readBytes(bytes);
      String s = new String(bytes);
      ProxyAssertSupport.assertEquals("jboss", s);
View Full Code Here

            //Ok
         }
        
         try
         {
            received.readBoolean();
           
            fail("Should throw exception");
         }
         catch (MessageEOFException e)
         {
View Full Code Here

      }

      // Reading should not be possible when message is read-write
      try
      {
         m.readBoolean();
         ProxyAssertSupport.fail();
      }
      catch (javax.jms.MessageNotReadableException e)
      {
      }
View Full Code Here

      queueProducer.send(HornetQServerTestCase.queue1, m);

      StreamMessage m2 = (StreamMessage)queueConsumer.receive(2000);

      ProxyAssertSupport.assertEquals(myBool, m2.readBoolean());
      ProxyAssertSupport.assertEquals(myByte, m2.readByte());
      ProxyAssertSupport.assertEquals(myShort, m2.readShort());
      ProxyAssertSupport.assertEquals(myChar, m2.readChar());
      ProxyAssertSupport.assertEquals(myInt, m2.readInt());
      ProxyAssertSupport.assertEquals(myLong, m2.readLong());
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.