Package org.jboss.jms.message

Examples of org.jboss.jms.message.JBossTextMessage


      return new StreamMessageProxy(jbm);
   }
  
   public Object handleCreateTextMessage(Invocation invocation) throws Throwable
  
      JBossTextMessage jbm = new JBossTextMessage(0);
     
      MethodInvocation mi = (MethodInvocation)invocation;

      if (mi.getArguments() != null && mi.getArguments().length > 0)
      {
         jbm.setText((String)mi.getArguments()[0]);
      }
     
      return new TextMessageProxy(jbm);
   }     
View Full Code Here


  
   protected Message createMessage(byte i, boolean reliable) throws Exception
   {
      HashMap coreHeaders = generateFilledMap(true);        
          
      JBossTextMessage m =
         new JBossTextMessage(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.setText(randString(10000));
      return m;     
   }
View Full Code Here

   }


   public void testCopyOnJBossTextMessage() throws JMSException
   {
      JBossTextMessage jbossTextMessage = (JBossTextMessage)
         (((MessageProxy)queueProducerSession.createTextMessage()).getMessage());
     
      JBossTextMessage copy = new JBossTextMessage(jbossTextMessage);

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

   public void testCopyOnForeignTextMessage() throws JMSException
   {
      TextMessage foreignTextMessage = new SimpleJMSTextMessage();

      JBossTextMessage copy = new JBossTextMessage(foreignTextMessage, 0);

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

/*     */     {
/*  57 */       m = new JBossObjectMessage();
/*     */     }
/*  59 */     else if (type == 3)
/*     */     {
/*  61 */       m = new JBossTextMessage();
/*     */     }
/*  63 */     else if (type == 4)
/*     */     {
/*  65 */       m = new JBossBytesMessage();
/*     */     }
View Full Code Here

/*     */     case 2:
/* 112 */       m = new JBossObjectMessage(messageID, reliable, expiration, timestamp, priority, headers, payload);
/*     */
/* 114 */       break;
/*     */     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);
/*     */
View Full Code Here

/* 689 */     return new StreamMessageProxy(jbm);
/*     */   }
/*     */
/*     */   public Object handleCreateTextMessage(Invocation invocation) throws Throwable
/*     */   {
/* 694 */     JBossTextMessage jbm = new JBossTextMessage(0L);
/*     */
/* 696 */     MethodInvocation mi = (MethodInvocation)invocation;
/*     */
/* 698 */     if ((mi.getArguments() != null) && (mi.getArguments().length > 0))
/*     */     {
/* 700 */       jbm.setText((String)mi.getArguments()[0]);
/*     */     }
/*     */
/* 703 */     return new TextMessageProxy(jbm);
/*     */   }
View Full Code Here

/*     */             else
/*     */             {
/*     */               JBossMessage messageToSend;
/* 203 */               if ((m instanceof TextMessage))
/*     */               {
/* 205 */                 messageToSend = new JBossTextMessage((TextMessage)m, 0L);
/*     */               }
/*     */               else
/*     */               {
/* 209 */                 messageToSend = new JBossMessage(m, 0L);
/*     */               }
View Full Code Here

         {
            messageToSend = new JBossStreamMessage((StreamMessage)m,0);
         }
         else if(m instanceof TextMessage)
         {
            messageToSend = new JBossTextMessage((TextMessage)m,0);
         }
         else
         {
            messageToSend = new JBossMessage(m, 0);
         }
View Full Code Here

TOP

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

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.