Package org.jboss.jms.message

Examples of org.jboss.jms.message.JBossBytesMessage


         // a message whose implementation is not one of its own.

         // create a matching JBossMessage Type from JMS Type
         if(m instanceof BytesMessage)
         {
            messageToSend = new JBossBytesMessage((BytesMessage)m,0);
         }
         else if(m instanceof MapMessage)
         {
            messageToSend = new JBossMapMessage((MapMessage)m,0);
         }
View Full Code Here


      return new MessageProxy(jbm);
   }
  
   public Object handleCreateBytesMessage(Invocation invocation) throws Throwable
   {
      JBossBytesMessage jbm = new JBossBytesMessage(0);
        
      return new BytesMessageProxy(jbm);
   }
View Full Code Here

  
   protected Message createMessage(byte i, boolean reliable) throws Exception
   {
      HashMap coreHeaders = generateFilledMap(true);        
     
      JBossBytesMessage m =
         new JBossBytesMessage(i,
         reliable,
         System.currentTimeMillis() + 1000 * 60 * 60,
         System.currentTimeMillis(),
         i,
         coreHeaders,
         null);
     
      setDestination(m, i);
      setReplyTo(m, i);    
      m.setJMSType("testType");
      setCorrelationID(m, i);
     
      m.writeBoolean(randBool().booleanValue());
      m.writeByte(randByte().byteValue());
      m.writeBytes(randByteArray(500));
      m.writeChar(randChar().charValue());
      m.writeDouble(randDouble().doubleValue());
      m.writeFloat(randFloat().floatValue());
      m.writeInt(randInt().intValue());
      m.writeLong(randLong().longValue());     
      m.writeShort(randShort().shortValue());
      m.writeUTF(randString(1000));

      return m;     
   }
View Full Code Here

      {
         m = new JBossTextMessage();
      }
      else if (type == JBossBytesMessage.TYPE//4
      {
         m = new JBossBytesMessage();
      }
      else if (type == JBossMapMessage.TYPE//5
      {
         m = new JBossMapMessage();
      }
View Full Code Here

                                     timestamp, priority, headers, payload);
            break;
         }
         case JBossBytesMessage.TYPE:
         {
            m = new JBossBytesMessage(messageID, reliable, expiration,
                                      timestamp, priority, headers, payload);
            break;
         }
         case JBossMapMessage.TYPE:
         {
View Full Code Here

      return new MessageProxy(jbm);
   }
  
   public Object handleCreateBytesMessage(Invocation invocation) throws Throwable
   {
      JBossBytesMessage jbm = new JBossBytesMessage(0);
        
      return new BytesMessageProxy(jbm);
   }
View Full Code Here

         // a message whose implementation is not one of its own.

         // create a matching JBossMessage Type from JMS Type
         if(m instanceof BytesMessage)
         {
            messageToSend = new JBossBytesMessage((BytesMessage)m,0);
         }
         else if(m instanceof MapMessage)
         {
            messageToSend = new JBossMapMessage((MapMessage)m,0);
         }
View Full Code Here

      return new MessageProxy(jbm);
   }
  
   public Object handleCreateBytesMessage(Invocation invocation) throws Throwable
   {
      JBossBytesMessage jbm = new JBossBytesMessage(0);
        
      return new BytesMessageProxy(jbm);
   }
View Full Code Here

   }
  

   public void testCopyOnJBossBytesMessage() throws JMSException
   {
      JBossBytesMessage jbossBytesMessage = (JBossBytesMessage)(((MessageProxy)queueProducerSession.
         createBytesMessage()).getMessage());

      for(int i = 0; i < 20; i++)
      {
         jbossBytesMessage.writeByte((byte)i);
      }

     
      jbossBytesMessage.reset();
      JBossBytesMessage copy = new JBossBytesMessage(jbossBytesMessage);

      copy.reset();

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

      for(int i = 0; i < 20; i++)
      {
         foreignBytesMessage.writeByte((byte)i);
      }

      JBossBytesMessage copy = new JBossBytesMessage(foreignBytesMessage, 0);

      foreignBytesMessage.reset();
      copy.reset();

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

TOP

Related Classes of org.jboss.jms.message.JBossBytesMessage

Copyright © 2018 www.massapicom. 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.