Package javax.jms

Examples of javax.jms.StreamMessage.writeInt()


      sent.writeByte((byte) 1);
      byte[] testBytes = "Bytes".getBytes();
      sent.writeBytes(testBytes);
      sent.writeChar('c');
      sent.writeShort((short) 31415);
      sent.writeInt(314159);
      sent.writeLong(3141592653589793238L);
      sent.writeDouble(3.1415926535897932384626433832795);
      sent.writeFloat(3.141f);
      sent.writeObject("31415926535897932384626433832795");
      sent.writeString("31415926535897932384626433832795");
View Full Code Here


        Connection con2 = (AMQConnection) getConnection("guest", "guest");
        AMQSession producerSession = (AMQSession) con2.createSession(false, Session.CLIENT_ACKNOWLEDGE);
        MessageProducer producer = producerSession.createProducer(queue);
        con.start();
        StreamMessage sm = producerSession.createStreamMessage();
        sm.writeInt(42);
        producer.send(sm);

        // Allow up to five seconds for the message to arrive with the consumer
        final boolean completed = awaitMessages.await(5, TimeUnit.SECONDS);
        assertTrue("Message did not arrive with consumer within a reasonable time", completed);
View Full Code Here

      sm.writeByte((byte)3);
      sm.writeBytes(new byte[] { (byte)4, (byte)5, (byte)6 });
      sm.writeChar((char)7);
      sm.writeDouble(8.0);
      sm.writeFloat(9.0f);
      sm.writeInt(10);
      sm.writeLong(11l);
      sm.writeObject("this is an object");
      sm.writeShort((short)12);
      sm.writeString("this is a String");
   }
View Full Code Here

      m.writeBoolean(myBool);
      m.writeByte(myByte);
      m.writeShort(myShort);
      m.writeChar(myChar);
      m.writeInt(myInt);
      m.writeLong(myLong);
      m.writeFloat(myFloat);
      m.writeDouble(myDouble);
      m.writeString(myString);
      m.writeBytes(myBytes);
View Full Code Here

      {
      }

      try
      {
         m2.writeInt(myInt);
         ProxyAssertSupport.fail();
      }
      catch (javax.jms.MessageNotWriteableException e)
      {
      }
View Full Code Here

        Connection con2 = (AMQConnection) getConnection("guest", "guest");
        AMQSession producerSession = (AMQSession) con2.createSession(false, Session.CLIENT_ACKNOWLEDGE);
        MessageProducer mandatoryProducer = producerSession.createProducer(queue);
        con.start();
        StreamMessage sm = producerSession.createStreamMessage();
        sm.writeInt(42);
        mandatoryProducer.send(sm);
        Thread.sleep(2000);
        con.close();
        con2.close();
    }
View Full Code Here

      msg.writeByte((byte)0);
      msg.writeBoolean(true);
      msg.writeChar('c');
      msg.writeDouble(1.11d);
      msg.writeFloat(1.1f);
      msg.writeInt(1);
      msg.writeShort((short)1);
      msg.writeString(TEXT);

      /* Send the message */
      qsender.send(msg);
 
View Full Code Here

      sent.writeByte((byte) 1);
      byte[] testBytes = "Bytes".getBytes();
      sent.writeBytes(testBytes);
      sent.writeChar('c');
      sent.writeShort((short) 31415);
      sent.writeInt(314159);
      sent.writeLong(3141592653589793238L);
      sent.writeDouble(3.1415926535897932384626433832795);
      sent.writeFloat(3.141f);
      sent.writeObject("31415926535897932384626433832795");
      sent.writeString("31415926535897932384626433832795");
View Full Code Here

      {
      }

      try
      {
         m2.writeInt(myInt);
         fail();
      }
      catch (javax.jms.MessageNotWriteableException e)
      {
      }
View Full Code Here

      m.writeBoolean(myBool);
      m.writeByte(myByte);
      m.writeShort(myShort);
      m.writeChar(myChar);
      m.writeInt(myInt);
      m.writeLong(myLong);
      m.writeFloat(myFloat);
      m.writeDouble(myDouble);
      m.writeString(myString);
      m.writeBytes(myBytes);
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.