Package javax.jms

Examples of javax.jms.StreamMessage.writeString()


         //5 Send some Stream messages
         for (int i = 0; i < NUM_MESSAGES; i++)
         {
            StreamMessage m = producerSess.createStreamMessage();
            m.writeString("stream-message");
            m.setFloatProperty("float_property", 1.05f);
            m.setIntProperty("int_property", 100);
            producer.send(m);
         }
  
View Full Code Here


        MessageProducer producer = session.createProducer(destination);

        // Send the message.
        {
            StreamMessage message = session.createStreamMessage();
            message.writeString("This is a test to see how it works.");
            producer.send(message);
        }

        // Check the message.
        {
View Full Code Here

        waitForConsumerRegistration(localBroker, 1, included);

        StreamMessage test = localSession.createStreamMessage();

        for (int i = 0; i < 100; ++i) {
            test.writeString("test string: " + i);
        }

        producer.send(test);
        Message msg = consumer1.receive(RECEIVE_TIMEOUT_MILLS);
        assertNotNull(msg);
View Full Code Here

         ObjectMessage om = sessSend.createObjectMessage();
         om.setObject("aardvark");

         StreamMessage sm = sessSend.createStreamMessage();
         sm.writeString("aardvark");

         TextMessage tm = sessSend.createTextMessage("aardvark");

         theProducer.send(m);
         theProducer.send(bm);
View Full Code Here

      m.writeChar(myChar);
      m.writeInt(myInt);
      m.writeLong(myLong);
      m.writeFloat(myFloat);
      m.writeDouble(myDouble);
      m.writeString(myString);
      m.writeBytes(myBytes);
      m.writeBytes(myBytes, 2, 3);

      m.writeObject(new Boolean(myBool));
      m.writeObject(new Byte(myByte));
View Full Code Here

         ObjectMessage om = sessSend.createObjectMessage();
         om.setObject("aardvark");

         StreamMessage sm = sessSend.createStreamMessage();
         sm.writeString("aardvark");

         TextMessage tm = sessSend.createTextMessage("aardvark");

         theProducer.send(m);
         theProducer.send(bm);
View Full Code Here

    m.writeChar(myChar);
    m.writeInt(myInt);
    m.writeLong(myLong);
    m.writeFloat(myFloat);
    m.writeDouble(myDouble);
    m.writeString(myString);
    m.writeBytes(myBytes);
    m.writeBytes(myBytes, 2, 3);

    m.writeObject(new Boolean(myBool));
    m.writeObject(new Byte(myByte));
View Full Code Here

   public void testNullValue() throws Exception
   {
      StreamMessage m = session.createStreamMessage();

      m.writeString(null);

      queueProd.send(m);

      conn.start();
View Full Code Here

      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");
   }

   protected void assertEquivalent(Message m, int mode, boolean redelivery) throws JMSException
   {
      super.assertEquivalent(m, mode, redelivery);
View Full Code Here

   public void testStreamMessage_2()
   {
      try
      {
         StreamMessage message = senderSession.createStreamMessage();
         message.writeString("pi");
         message.writeDouble(3.14159);
         sender.send(message);

         Message m = receiver.receive(TestConfig.TIMEOUT);
         assertTrue("The message should be an instance of StreamMessage.\n", m instanceof StreamMessage);
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.