Package org.hornetq.api.core

Examples of org.hornetq.api.core.Message


            while (iterator.hasNext())
            {
               MessageReference ref = iterator.next();
               if (filter == null || filter.match(ref.getMessage()))
               {
                  Message message = ref.getMessage();
                  messages.add(message.toMap());
               }
            }
            return messages.toArray(new Map[messages.size()]);
         }
         finally
View Full Code Here


         {
            // returns just the first, as it's the first only
            if (iterator.hasNext())
            {
               MessageReference ref = iterator.next();
               Message message = ref.getMessage();
               messages.add(message.toMap());
            }
            return toJSON(messages.toArray(new Map[1])).toString();
         }
         finally
         {
View Full Code Here

    {
        Map<String, Object>[] messages = new Map[refs.size()];
        int i = 0;
        for (MessageReference ref : refs)
        {
            Message message = ref.getMessage();
            messages[i++] = message.toMap();
        }
        return messages;
    }
View Full Code Here

            while (iterator.hasNext())
            {
               MessageReference ref = iterator.next();
               if (filter == null || filter.match(ref.getMessage()))
               {
                  Message message = ref.getMessage();
                  messages.add(message.toMap());
               }
            }
            return messages.toArray(new Map[messages.size()]);
         }
         finally
View Full Code Here

      ClientProducer producer = session.createProducer(ClientCrashTest.QUEUE);

      session.start();

      // receive a message from the queue
      Message messageFromClient = consumer.receive(500000);
      Assert.assertNotNull("no message received", messageFromClient);
      Assert.assertEquals(ClientCrashTest.MESSAGE_TEXT_FROM_CLIENT, messageFromClient.getBodyBuffer().readString());

      assertActiveConnections(1 + 1); // One local and one from the other vm
      assertActiveSession(1 + 1);

      ClientMessage message = session.createMessage(HornetQTextMessage.TYPE,
View Full Code Here

      producer.send(message);

      ClientConsumer consumer = session.createConsumer(CoreClientOverSSLTest.QUEUE);
      session.start();

      Message m = consumer.receive(1000);
      Assert.assertNotNull(m);
      Assert.assertEquals(text, m.getBodyBuffer().readString());
      locator.close();
   }
View Full Code Here

               userId = org.hornetq.utils.UUIDGenerator.getInstance().generateUUID();
               break;
         }
      }

      Message message = session.createMessage(type, true, expiration, timestamp, priority);
      message.setUserID(userId);

      boolean endLoop = false;

      // loop through the XML and gather up all the message's data (i.e. body, properties, queues, etc.)
      while (reader.hasNext())
View Full Code Here

               userId = org.hornetq.utils.UUIDGenerator.getInstance().generateUUID();
               break;
         }
      }

      Message message = session.createMessage(type, true, expiration, timestamp, priority);
      message.setUserID(userId);

      boolean endLoop = false;

      // loop through the XML and gather up all the message's data (i.e. body, properties, queues, etc.)
      while (reader.hasNext())
View Full Code Here

    {
        Map<String, Object>[] messages = new Map[refs.size()];
        int i = 0;
        for (MessageReference ref : refs)
        {
            Message message = ref.getMessage();
            messages[i++] = message.toMap();
        }
        return messages;
    }
View Full Code Here

            while (iterator.hasNext())
            {
               MessageReference ref = iterator.next();
               if (filter == null || filter.match(ref.getMessage()))
               {
                  Message message = ref.getMessage();
                  messages.add(message.toMap());
               }
            }
            return messages.toArray(new Map[messages.size()]);
         }
         finally
View Full Code Here

TOP

Related Classes of org.hornetq.api.core.Message

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.