Package org.mule.api.endpoint

Examples of org.mule.api.endpoint.ImmutableEndpoint


    public void testCreateMessageInflowEndpoint() throws MuleException
    {
        MuleActivationSpec activationSpec = new MuleActivationSpec();
        activationSpec.setEndpoint("test://testEndpoint");
        ImmutableEndpoint endpoint = resourceAdapter.createMessageInflowEndpoint(activationSpec);
        assertEndpointAttributes(endpoint);
    }
View Full Code Here


        testEndpointAttribute("err", "system.err");
    }

    protected void testEndpointAttribute(String name, String address)
    {
        ImmutableEndpoint endpoint = (ImmutableEndpoint) muleContext.getRegistry().lookupObject(name);
        assertNotNull("Null " + name, endpoint);
        assertEquals(address, endpoint.getEndpointURI().getAddress());
    }
View Full Code Here

        testJcaService(service);

        testEndpoint(service);

        // Check endpoint
        ImmutableEndpoint endpoint2 = ((ServiceCompositeMessageSource) service.getMessageSource()).getEndpoints().get(0);
        assertEquals(endpoint, endpoint2);

        // Check service implementation
        assertEquals(endpointFactory, ((JcaComponent) service.getComponent()).messageEndpointFactory);
    }
View Full Code Here

    }

    protected void testEndpoint(Service service)
    {
        ServiceCompositeMessageSource inboundRouterCollection = (ServiceCompositeMessageSource) service.getMessageSource();
        ImmutableEndpoint endpoint = inboundRouterCollection.getEndpoints().get(0);
        assertEndpointAttributes(endpoint);
    }
View Full Code Here

    {
        String endpointKey = getCounterEndpointKey(receiver.getEndpointURI());

        for (Iterator iterator = ((ServiceCompositeMessageSource) axisComponent.getMessageSource()).getEndpoints().iterator(); iterator.hasNext();)
        {
            ImmutableEndpoint endpoint = (ImmutableEndpoint) iterator.next();
            if (endpointKey.startsWith(endpoint.getEndpointURI().getAddress()))
            {
                logger.info("Unregistering Axis endpoint: " + endpointKey + " for service: "
                        + ((AxisMessageReceiver) receiver).getSoapService().getName());
            }
            try
            {
                endpoint.getConnector()
                        .unregisterListener(receiver.getEndpoint(), axisComponent);
            }
            catch (Exception e)
            {
                logger.error("Failed to unregister Axis endpoint: " + endpointKey + " for service: "
View Full Code Here

        }
    }

    protected EndpointURI getUriByEndpointName(MuleClient muleClient, String endpointName) throws IOException
    {
        ImmutableEndpoint endpoint = getImmutableEndpoint(muleClient, endpointName);
        return endpoint.getEndpointURI();
    }
View Full Code Here

     * @param endpointName
     * @return the endpoint address in the form 'sftp://user:password@host/path'
     */
    protected String getAddressByEndpoint(MuleClient muleClient, String endpointName)
    {
        ImmutableEndpoint endpoint = (ImmutableEndpoint) muleClient.getProperty(endpointName);
        EndpointURI endpointURI = endpoint.getEndpointURI();

        return "sftp://" + endpointURI.getUser() + ":" + endpointURI.getPassword() + "@"
               + endpointURI.getHost() + endpointURI.getPath();
    }
View Full Code Here

               + endpointURI.getHost() + endpointURI.getPath();
    }

    protected String getPathByEndpoint(MuleClient muleClient, SftpClient sftpClient, String endpointName)
    {
        ImmutableEndpoint endpoint = (ImmutableEndpoint) muleClient.getProperty(endpointName);
        EndpointURI endpointURI = endpoint.getEndpointURI();

        return sftpClient.getAbsolutePath(endpointURI.getPath());
    }
View Full Code Here

     * @return
     * @throws IOException
     */
    protected SftpClient getSftpClient(MuleClient muleClient, String endpointName) throws IOException
    {
        ImmutableEndpoint endpoint = getImmutableEndpoint(muleClient, endpointName);
        EndpointURI endpointURI = endpoint.getEndpointURI();
        SftpClient sftpClient = new SftpClient(endpointURI.getHost());

        SftpConnector sftpConnector = (SftpConnector) endpoint.getConnector();

        if (sftpConnector.getIdentityFile() != null)
        {
            try
            {
View Full Code Here

    }

    protected ImmutableEndpoint getImmutableEndpoint(MuleClient muleClient, String endpointName)
        throws IOException
    {
        ImmutableEndpoint endpoint = null;

        Object o = muleClient.getProperty(endpointName);
        if (o instanceof ImmutableEndpoint)
        {
            // For Inbound and Outbound Endpoints
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.