Package org.mule.api.client

Examples of org.mule.api.client.LocalMuleClient


    {

        @Override
        public void run()
        {
            LocalMuleClient client = muleContext.getClient();
            while (!Thread.currentThread().isInterrupted())
            {
                try
                {
                    client.request("vm://testOut", RECEIVE_TIMEOUT);
                }
                catch (Exception e)
                {
                    // Ignore
                }
View Full Code Here


        @Override
        public void execute(int messageId) throws Exception
        {
            logger.info("Thread: " + Thread.currentThread().getName() + " message: " + messageId);
            LocalMuleClient client = muleContext.getClient();

            client.send("vm://testRequestResponse", TEST_MESSAGE, null);
        }
View Full Code Here

        @Override
        public void execute(int messageId) throws Exception
        {
            logger.info("Thread: " + Thread.currentThread().getName() + " message: " + messageId);
            LocalMuleClient client = muleContext.getClient();

            client.dispatch("vm://testOneWay", TEST_MESSAGE, null);
        }
View Full Code Here

        try
        {
            testDatabase.executeUpdate(connection, "DELETE FROM ALIEN");

            LocalMuleClient client = muleContext.getClient();

            Map<String, Object> messageProperties = new HashMap<String, Object>();
            messageProperties.put("name", Alien.ET.getName());

            return client.send("vm://insertXmlType", builder.build(connection), messageProperties);
        }
        finally
        {
            if (connection != null)
            {
View Full Code Here

    }

    @Test
    public void usesParamsInInlineQuery() throws Exception
    {
        LocalMuleClient client = muleContext.getClient();

        MuleMessage response = client.send("vm://inlineQuery", TEST_MESSAGE, null);

        assertMessageContains(response, TestRecordUtil.getMarsRecord());
    }
View Full Code Here

    }

    @Test
    public void usesExpressionParam() throws Exception
    {
        LocalMuleClient client = muleContext.getClient();

        Map<String, Object> props = new HashMap<String, Object>();
        props.put("type", 3);
        MuleMessage response = client.send("vm://expressionParam", TEST_MESSAGE, props);

        assertMessageContains(response, TestRecordUtil.getEarthRecord());
    }
View Full Code Here

    }

    @Test
    public void updatesDataRequestResponse() throws Exception
    {
        LocalMuleClient client = muleContext.getClient();
        MuleMessage response = client.send("vm://executeDdlRequestResponse", TEST_MESSAGE, null);

        assertTableCreation(response.getPayload());
    }
View Full Code Here

    }

    @Test
    public void updatesDataOneWay() throws Exception
    {
        LocalMuleClient client = muleContext.getClient();
        client.dispatch("vm://executeDdlOneWay", TEST_MESSAGE, null);

        MuleMessage response = client.request("vm://testOut", RECEIVE_TIMEOUT);

        assertTableCreation(response.getPayload());
    }
View Full Code Here

    }

    @Test
    public void usesCustomSource() throws Exception
    {
        LocalMuleClient client = muleContext.getClient();

        MuleMessage response = client.send("vm://executeDdlCustomSource", TEST_MESSAGE, null);

        assertTableCreation(response.getPayload());
    }
View Full Code Here

    }

    @Test
    public void streamsRecords() throws Exception
    {
        LocalMuleClient client = muleContext.getClient();
        MuleMessage response = client.send("vm://selectStreaming", TEST_MESSAGE, null);

        assertThat(response.getPayload(), is(instanceOf(ResultSetIterator.class)));
        assertRecords(response.getInboundProperty("processedRecords"), getAllPlanetRecords());
    }
View Full Code Here

TOP

Related Classes of org.mule.api.client.LocalMuleClient

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.