Package org.mule.api.endpoint

Examples of org.mule.api.endpoint.ImmutableEndpoint


        SftpClient sftpClientInbound = getSftpClient(muleClient, inboundEndpointName);
        SftpClient sftpClientOutbound = getSftpClient(muleClient, outboundEndpointName);

        try
        {
            ImmutableEndpoint inboundEndpoint = (ImmutableEndpoint) muleClient.getProperty(inboundEndpointName);

            ImmutableEndpoint outboundEndpoint = (ImmutableEndpoint) muleClient.getProperty(outboundEndpointName);

            if (shouldInboundFileStillExist)
            {
                assertTrue("The inbound file should still exist", super.verifyFileExists(sftpClientInbound,
                    inboundEndpoint.getEndpointURI(), FILE_NAME));
            }
            else
            {
                assertFalse("The inbound file should have been deleted", super.verifyFileExists(
                    sftpClientInbound, inboundEndpoint.getEndpointURI(), FILE_NAME));
            }

            if (shouldOutboundFileExist)
            {
                assertTrue("The outbound file should exist", super.verifyFileExists(sftpClientOutbound,
                    outboundEndpoint.getEndpointURI(), FILE_NAME));
            }
            else
            {
                assertFalse("The outbound file should have been deleted", super.verifyFileExists(
                    sftpClientOutbound, outboundEndpoint.getEndpointURI(), FILE_NAME));
            }
        }
        finally
        {
            sftpClientInbound.disconnect();
View Full Code Here


            // Make sure a file still exists only in the outbound endpoint
            verifyInAndOutFiles(muleClient, INBOUND_ENDPOINT_NAME, OUTBOUND_ENDPOINT_NAME, false, true);

            // Make sure a new file with name according to the notation is created
            ImmutableEndpoint endpoint = (ImmutableEndpoint) muleClient.getProperty(OUTBOUND_ENDPOINT_NAME);
            assertTrue("A new file in the outbound endpoint should exist", verifyFileExists(sftpClient,
                endpoint.getEndpointURI().getPath(), "file_1.txt"));

        }
        finally
        {
            sftpClient.disconnect();
View Full Code Here

            .endsWith("/DIRECTORY-MISSING'."));

        SftpClient sftpClient = getSftpClient(muleClient, ENDPOINT_NAME);
        try
        {
            ImmutableEndpoint endpoint = (ImmutableEndpoint) muleClient.getProperty(ENDPOINT_NAME);
            assertTrue("The inbound file should still exist", super.verifyFileExists(sftpClient,
                endpoint.getEndpointURI(), FILE_NAME));
        }
        finally
        {
            sftpClient.disconnect();
        }
View Full Code Here

        assertEquals(MockProvider.class, connector.getClientProvider().getClass());
    }

    public void testEndpointProperties() throws Exception
    {
        ImmutableEndpoint endpoint =
                muleContext.getRegistry().lookupEndpointBuilder("endpoint").buildOutboundEndpoint();
        Map props = endpoint.getProperties();
        assertEquals("#[methodNamespace]#[method]", assertKey(props, SoapConstants.SOAP_ACTION_PROPERTY, String.class));
        assertEquals("direct", assertKey(props, SoapConstants.SOAP_ACTION_PROPERTY_CAPS, String.class));
        assertEquals("clientConfig", assertKey(props, "clientConfig", String.class));
        assertEquals(Use.ENCODED_STR, assertKey(props, AxisConnector.USE, String.class));
        assertEquals(Style.DOCUMENT_STR, assertKey(props, AxisConnector.STYLE, String.class));
View Full Code Here

        EndpointBuilder endpointBuiler = muleContext.getRegistry().lookupEndpointBuilder("Endpoint");
        // There should however be an endpoint builder with this id/name
        assertNotNull(endpointBuiler);

        ImmutableEndpoint endpoint2 = (ImmutableEndpoint) muleContext.getRegistry().lookupObject(
            "axis:http://localhost:" + getPorts().get(0) + "/mule/Service?method=toString");
        // Null expected because lookupEndpoint does not create endpoints from uri's.
        assertNull(endpoint2);
    }
View Full Code Here

        assertNull(endpoint2);
    }

    public void testGetOutboundEndpoint() throws MuleException
    {
        ImmutableEndpoint endpoint1 = muleContext.getEndpointFactory().getOutboundEndpoint(
            "Endpoint");
        assertEndpointOk(endpoint1);
        ImmutableEndpoint endpoint2 = muleContext.getEndpointFactory().getOutboundEndpoint(
            "axis:http://localhost:" + getPorts().get(0) + "/mule/Service?method=toString");
        assertEndpointOk(endpoint2);
    }
View Full Code Here

        assertEndpointOk(endpoint2);
    }

    public void testGetInboundEndpoint() throws MuleException
    {
        ImmutableEndpoint endpoint1 = muleContext.getEndpointFactory().getInboundEndpoint(
            "Endpoint");
        assertEndpointOk(endpoint1);
        ImmutableEndpoint endpoint2 = muleContext.getEndpointFactory().getInboundEndpoint(
            "axis:http://localhost:" + getPorts().get(0) + "/mule/Service?method=toString");
        assertEndpointOk(endpoint2);
    }
View Full Code Here

        assertEndpointOk(endpoint2);
    }

    public void testGetResponseEndpoint() throws MuleException
    {
        ImmutableEndpoint endpoint1 = muleContext.getEndpointFactory().getInboundEndpoint(
            "Endpoint");
        assertEndpointOk(endpoint1);
        ImmutableEndpoint endpoint2 = muleContext.getEndpointFactory().getInboundEndpoint(
            "axis:http://localhost:" + getPorts().get(0) + "/mule/Service?method=toString");
        assertEndpointOk(endpoint2);
    }
View Full Code Here

    public ImmutableEndpoint processEndpoint(AnnotatedEndpointData epData) throws MuleException
    {
        preprocessEndpointData(epData);

        ImmutableEndpoint endpoint;
        EndpointBuilder endpointBuilder = getEndpointBuilder(epData);

        if (epData.getProperties() != null && epData.getProperties().size() > 0)
        {
            endpointBuilder.setProperties(epData.getProperties());
View Full Code Here

        executeBaseTest("inboundEndpoint4", "vm://test.upload4", "file4.txt", SEND_SIZE, "receiving4",
            TIMEOUT, "receiving4");

        MuleClient muleClient = new MuleClient(muleContext);
        ImmutableEndpoint endpoint = getImmutableEndpoint(muleClient, "send4outbound");
        SftpUtil util = new SftpUtil(endpoint);

        assertEquals("The value on the connector should be used", "addSeqNo", util.getDuplicateHandling());
    }
View Full Code Here

TOP

Related Classes of org.mule.api.endpoint.ImmutableEndpoint

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.