Package org.mule.extras.client

Examples of org.mule.extras.client.MuleClient.receive()


        }

        // Retrieve using Mule Client
        for (int i = 0; i < messageCount; i++)
        {
            msg = client.receive("pop3://login:password@localhost:3110", 100);
            assertNotNull(msg);
            assertTrue(msg.getPayload() instanceof String);
            result = (String)msg.getPayload();
            assertEquals(result.trim(), body + " " + i);
        }
View Full Code Here


        }

        // Retrieve using Mule Client
        for (int i = 0; i < messageCount; i++)
        {
            msg = client.receive("vm://outbound", 30000);
            assertNotNull(msg);
            assertTrue(msg.getPayload() instanceof String);
            result = (String)msg.getPayload();
            split = result.trim().split(" ");
            // assertTrue(result.trim().compareTo(body+" "+i)==0);
View Full Code Here

        for (int i = 0; i < messageCount; i++)
        {
            assertTrue(received[i]);
        }

        assertNull(client.receive("vm://outbound", 50));
    }

    public void testLatinEncodedMessage() throws Exception
    {
        MuleClient client = new MuleClient();
View Full Code Here

        }

        // Retrieve using Mule Client
        for (int i = 0; i < messageCount; i++)
        {
            msg = client.receive("vm://outbound", 1000000000);
            assertNotNull(msg);
            assertTrue(msg.getPayload() instanceof String);
            result = (String)msg.getPayload();
            split = result.trim().split(" ");
            // assertTrue(result.trim().compareTo("\u00CB\u00C7"+" "+i)==0);
View Full Code Here

        for (int i = 0; i < messageCount; i++)
        {
            assertTrue(received[i]);
        }

        assertNull(client.receive("vm://outbound", 50));
    }

    // @Override
    protected String getConfigResources()
    {
View Full Code Here

        c.setHostname("vmmachine");
        c.setConnectionFactory(f);

        client.getManager().registerConnector(c);
        client.sendNoReceive("mqs://QM_vmmachine/MuleQueue", TEST_MSG, null);
        UMOMessage result = client.receive("mqs://QM_vmmachine/MuleQueue", 3000);
        assertNotNull(result);
        assertEquals(TEST_MSG, result.getPayloadAsString());    }

    public void testFunctionalRemoteQueue() throws Exception {
View Full Code Here

        corpCnn.setConnectionFactory(corp);
        client.getManager().registerConnector(corpCnn);
        client.getManager().start();

        client.sendNoReceive("mqs://QM_vmmachine/MuleQueue", TEST_MSG, null);
        UMOMessage result = client.receive("mqs://QM_vmmachine/MuleQueue", 3000);
        assertNotNull(result);
        assertEquals(TEST_MSG, result.getPayloadAsString());

    }
}
View Full Code Here

        c.setHostname("VMMachine"); //AB
        c.setPort (6969);
        c.setConnectionFactory(f);
        client.getManager().registerConnector(c);
        client.sendNoReceive("mqs://QM_vmmachine/MuleQueue", TEST_MSG, null);
        UMOMessage result = client.receive("mqs://QM_vmmachine/MuleQueue", 3000);
        assertNotNull(result);
        assertEquals(TEST_MSG, result.getPayloadAsString());

    }
}
View Full Code Here

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.