Examples of MessageList


Examples of org.servicemix.examples.MessageList

        QName service = new QName("http://servicemix.org/cheese/", "transformer");

        sendMessages(service, 20);
        assertMessagesReceived(20);

        MessageList messageList1 = assertMessagesReceived("service1", 20);
        MessageList messageList2 = assertMessagesReceived("service2", 20);
        MessageList messageList3 = assertMessagesReceived("service3", 40);

        assertMessageXPath(messageList1, 0, "/cheese", "Edam");
        assertMessageXPath(messageList1, 1, "/cheese", "Edam");
        assertMessageXPath(messageList1, 19, "/cheese", "Edam");
        assertMessageXPath(messageList1, 0, "/cheese/@id", "1");

Examples of org.servicemix.examples.MessageList

    public void testSendingAndReceivingMessagesUsingSpring() throws Exception {
        Sender sender = getSender();

        sender.sendMessages(messageCount);

        MessageList messageList = getReceivedMessageList();
        messageList.assertMessagesReceived(messageCount);

        // lets now look into the received messages
        List list = messageList.getMessages();
        NormalizedMessage message = (NormalizedMessage) list.get(0);
        Object property = message.getProperty("foo");
        assertEquals("Message 'foo' header", "hello", property);
    }

Examples of org.servicemix.examples.MessageList

    }

    protected void assertMessagesReceived(int messageCount) throws Exception {
        assertNotNull("receiver not found in JBI container", receiver);

        MessageList messageList = receiver.getMessageList();
        assertMessagesReceived(messageList, messageCount);
    }

Examples of org.servicemix.examples.MessageList

    protected MessageList assertMessagesReceived(String receiverName, int messageCount) throws Exception {
        Receiver receiver = (Receiver) getBean(receiverName);
        assertNotNull("receiver: " + receiverName + " not found in JBI container", receiver);

        MessageList messageList = receiver.getMessageList();
        assertMessagesReceived(messageList, messageCount);
        return messageList;
    }

Examples of org.servicemix.examples.MessageList

public class ChainedComponentTest extends SpringTestSupport {

    public void testSendingAndReceivingMessagesUsingSpring() throws Exception {
        super.testSendingAndReceivingMessagesUsingSpring();
        MessageList messageList = getReceivedMessageList();
        for (Iterator iter = messageList.getMessages().iterator(); iter.hasNext();) {
            NormalizedMessage msg = (NormalizedMessage) iter.next();
            assertNotNull(msg.getProperty("prop1"));
            assertNotNull(msg.getProperty("prop2"));
        }
    }

Examples of org.servicemix.examples.MessageList

        QName service = new QName("http://servicemix.org/cheese/", "transformer");

        sendMessages(service, 20);
        assertMessagesReceived(20);

        MessageList messageList1 = assertMessagesReceived("service1", 20);
        MessageList messageList2 = assertMessagesReceived("service2", 20);
        MessageList messageList3 = assertMessagesReceived("service3", 20);

        assertMessageHeader(messageList1, 0, "foo", "hello world!");
        assertMessageHeader(messageList1, 1, "foo", "hello world!");
        assertMessageHeader(messageList1, 19, "foo", "hello world!");

Examples of org.servicemix.examples.MessageList

    }

    protected void assertMessagesReceived(int messageCount) throws Exception {
        assertNotNull("receiver not found in JBI container", receiver);

        MessageList messageList = receiver.getMessageList();
        assertMessagesReceived(messageList, messageCount);
    }

Examples of org.servicemix.examples.MessageList

    protected MessageList assertMessagesReceived(String receiverName, int messageCount) throws Exception {
        Receiver receiver = (Receiver) getBean(receiverName);
        assertNotNull("receiver: " + receiverName + " not found in JBI container", receiver);

        MessageList messageList = receiver.getMessageList();
        assertMessagesReceived(messageList, messageCount);
        return messageList;
    }

Examples of plugins.Freetalk.MessageList

    WoTOwnMessageList list = new WoTOwnMessageList(author, getFreeOwnMessageListIndex(author));
    list.initializeTransient(mFreetalk);
   
    // TODO: Optimization: This is debug code which was added on 2011-02-13 for preventing DuplicateMessageListException, it can be removed after some months if they do not happen.
    try {
      final MessageList existingList = mFreetalk.getMessageManager().getOwnMessageList(list.getID());
      throw new RuntimeException("getFreeOwnMessageListIndex reported non-free index, taken by: " + existingList);
    } catch(NoSuchMessageListException e) {}
   
    list.addMessage(message);
    list.storeWithoutCommit();

Examples of se.sics.cooja.dialogs.MessageList

            "Error during main source file generation: " + e.getMessage())
            .initCause(e);
      }

      // Compile library
      MessageList taskOutput = new MessageList();
      boolean compilationSucceded = ContikiMoteTypeDialog.compileLibrary(
          identifier, new File(contikiBaseDir), compilationFiles,
          hasSystemSymbols, commStack, taskOutput
              .getInputStream(MessageList.NORMAL), taskOutput
              .getInputStream(MessageList.ERROR));
      if (!libFile.exists()) {
        MoteTypeCreationException ex = new MoteTypeCreationException(
        "Compilation error: " + libFile.getPath() + " does not exist");
        ex.setCompilationOutput(taskOutput);
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.