Package org.jboss.jms.message

Examples of org.jboss.jms.message.JBossBytesMessage


      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

   }
  

   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

/*     */     {
/*  61 */       m = new JBossTextMessage();
/*     */     }
/*  63 */     else if (type == 4)
/*     */     {
/*  65 */       m = new JBossBytesMessage();
/*     */     }
/*  67 */     else if (type == 5)
/*     */     {
/*  69 */       m = new JBossMapMessage();
/*     */     }
View Full Code Here

/*     */     case 3:
/* 118 */       m = new JBossTextMessage(messageID, reliable, expiration, timestamp, priority, headers, payload);
/*     */
/* 120 */       break;
/*     */     case 4:
/* 124 */       m = new JBossBytesMessage(messageID, reliable, expiration, timestamp, priority, headers, payload);
/*     */
/* 126 */       break;
/*     */     case 5:
/* 130 */       m = new JBossMapMessage(messageID, reliable, expiration, timestamp, priority, headers, payload);
/*     */
View Full Code Here

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

/* 181 */       foreign = true;
/*     */       JBossMessage messageToSend;
/*     */       JBossMessage messageToSend;
/* 187 */       if ((m instanceof BytesMessage))
/*     */       {
/* 189 */         messageToSend = new JBossBytesMessage((BytesMessage)m, 0L);
/*     */       }
/*     */       else
/*     */       {
/*     */         JBossMessage messageToSend;
/* 191 */         if ((m instanceof MapMessage))
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

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.