Package javax.jms

Examples of javax.jms.StreamMessage.writeByte()


   public void testCopyOnForeignStreamMessage() throws JMSException
   {
      StreamMessage foreignStreamMessage = new SimpleJMSStreamMessage();
      foreignStreamMessage.writeByte((byte)1);
      foreignStreamMessage.writeByte((byte)2);
      foreignStreamMessage.writeByte((byte)3);

      JBossStreamMessage copy = new JBossStreamMessage(foreignStreamMessage, 0);

      ensureEquivalent(foreignStreamMessage, copy);
View Full Code Here


   public void testCopyOnForeignStreamMessage() throws JMSException
   {
      StreamMessage foreignStreamMessage = new SimpleJMSStreamMessage();
      foreignStreamMessage.writeByte((byte)1);
      foreignStreamMessage.writeByte((byte)2);
      foreignStreamMessage.writeByte((byte)3);

      JBossStreamMessage copy = new JBossStreamMessage(foreignStreamMessage, 0);

      ensureEquivalent(foreignStreamMessage, copy);
   }
View Full Code Here

        _logger.info("Sending isBound message");
        StreamMessage msg = producerSession.createStreamMessage();

        msg.setStringProperty("F1000", "1");

        msg.writeByte((byte) 42);

        mandatoryProducer.send(msg);

        _logger.info("Starting consumer connection");
        con.start();
View Full Code Here

      QueueSender qsender = s_send.createSender(q);
      qsender.setDisableMessageTimestamp(false);
      /* create a text message for sending */
      StreamMessage msg = s_send.createStreamMessage();
      /* and write values into it */
      msg.writeByte((byte)0);
      msg.writeBoolean(true);
      msg.writeChar('c');
      msg.writeDouble(1.11d);
      msg.writeFloat(1.1f);
      msg.writeInt(1);
 
View Full Code Here

   public void testStreamMessage() throws Exception
   {
      log.info("+++ testStreamMessage");
      StreamMessage sent = session.createStreamMessage();
      sent.writeBoolean(true);
      sent.writeByte((byte) 1);
      byte[] testBytes = "Bytes".getBytes();
      sent.writeBytes(testBytes);
      sent.writeChar('c');
      sent.writeShort((short) 31415);
      sent.writeInt(314159);
View Full Code Here

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

  
   public void testSMBodyReadable() throws Exception
   {
      byte bValue = 123;
      StreamMessage sm = queueProducerSession.createStreamMessage();
      sm.writeByte(bValue);
      sm.setStringProperty("COM_SUN_JMS_TESTNAME",
                                    "xMessageEOFExceptionQTestforStreamMessage");
      queueProducer.send(sm);

      StreamMessage received = (StreamMessage)queueConsumer.receive(3000);
View Full Code Here

      char myChar = 'q';
      byte[] myBytes = new byte[]
      {-23, 114, -126, -12, 74, 87};

      m.writeBoolean(myBool);
      m.writeByte(myByte);
      m.writeShort(myShort);
      m.writeChar(myChar);
      m.writeInt(myInt);
      m.writeLong(myLong);
      m.writeFloat(myFloat);
View Full Code Here

      super.prepareMessage(m);

      StreamMessage sm = (StreamMessage)m;

      sm.writeBoolean(true);
      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);
View Full Code Here


   public void testCopyOnForeignStreamMessage() throws JMSException
   {
      StreamMessage foreignStreamMessage = new SimpleJMSStreamMessage();
      foreignStreamMessage.writeByte((byte)1);
      foreignStreamMessage.writeByte((byte)2);
      foreignStreamMessage.writeByte((byte)3);

      JBossStreamMessage copy = new JBossStreamMessage(foreignStreamMessage, 0);
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.