Package org.mule.api.endpoint

Examples of org.mule.api.endpoint.EndpointFactory


                context.dispatchEvent(action.getMessage(), endpoint);
                return null;
            }
            else
            {
                EndpointFactory endpointFactory = managementContext.getEndpointFactory();

                EndpointBuilder endpointBuilder = endpointFactory.getEndpointBuilder(action.getResourceIdentifier());
                endpointBuilder.setExchangePattern(MessageExchangePattern.REQUEST_RESPONSE);

                endpoint = managementContext.getEndpointFactory().getOutboundEndpoint(endpointBuilder);
                result = context.sendEvent(action.getMessage(), endpoint);
                if (result == null || VoidMuleEvent.getInstance().equals(result))
View Full Code Here


    }

    protected RemoteDispatcher(String endpoint, MuleContext muleContext) throws MuleException
    {
        this.muleContext = muleContext;
        EndpointFactory endpointFactory = muleContext.getEndpointFactory();
        asyncServerEndpoint = endpointFactory.getOutboundEndpoint(endpoint);

        EndpointBuilder endpointBuilder = endpointFactory.getEndpointBuilder(endpoint);
        endpointBuilder.setExchangePattern(MessageExchangePattern.REQUEST_RESPONSE);
        syncServerEndpoint = muleContext.getEndpointFactory().getOutboundEndpoint(
            endpointBuilder);

        wireFormat = requestWireFormat();
View Full Code Here

    }

    @Override
    public Object doGetObject() throws Exception
    {
        EndpointFactory ef = muleContext.getEndpointFactory();
        if (ef != null)
        {
            return ef.getInboundEndpoint(this);
        }
        else
        {
            throw new ConfigurationException(MessageFactory.createStaticMessage("EndpointFactory not found in Registry"));
        }
View Full Code Here

    }

    @Override
    public Object doGetObject() throws Exception
    {
        EndpointFactory ef = muleContext.getEndpointFactory();
        if (ef != null)
        {
            InboundEndpoint inboundEndpoint = ef.getInboundEndpoint(this);
            if (inboundEndpoint instanceof AbstractEndpoint)
            {
                AbstractEndpoint.class.cast(inboundEndpoint).setAnnotations(getAnnotations());
            }
            return inboundEndpoint;
View Full Code Here

    {
        return new CacheLoader<String, OutboundEndpoint>()
        {
            public OutboundEndpoint load(String key) throws Exception
            {
                EndpointFactory endpointFactory = muleContext.getEndpointFactory();
                EndpointBuilder endpointBuilder = endpointFactory.getEndpointBuilder(key);
                return endpointFactory.getOutboundEndpoint(endpointBuilder);
            }
        };
    }
View Full Code Here

    @Test
    public void testCreateInboundEndpoint() throws Exception
    {
        String uri = "test://address";
        EndpointFactory endpointFactory = new DefaultEndpointFactory();
        endpointFactory.setMuleContext(muleContext);
        ImmutableEndpoint ep = endpointFactory.getInboundEndpoint(uri);
        assertEquals(DefaultInboundEndpoint.class, ep.getClass());
        assertEquals(ep.getEndpointURI().getUri().toString(), "test://address");
        assertTrue(ep instanceof InboundEndpoint);
    }
View Full Code Here

    public void testCreateInboundEndpointFromGlobalEndpoint() throws Exception
    {
        muleContext.getRegistry().registerEndpointBuilder("myGlobalEndpoint",
                new EndpointURIEndpointBuilder("test://address", muleContext));
        String uri = "myGlobalEndpoint";
        EndpointFactory endpointFactory = new DefaultEndpointFactory();
        endpointFactory.setMuleContext(muleContext);
        try
        {
            ImmutableEndpoint ep = endpointFactory.getInboundEndpoint(uri);
            assertEquals(DefaultInboundEndpoint.class, ep.getClass());
            assertEquals(ep.getEndpointURI().getUri().toString(), "test://address");
            assertTrue(ep instanceof InboundEndpoint);
        }
        catch (Exception e)
View Full Code Here

    public void testCreateInboundEndpointFromNamedConcreteEndpoint() throws Exception
    {
        muleContext.getRegistry().registerEndpointBuilder("&myNamedConcreateEndpoint",
                new EndpointURIEndpointBuilder("test://address", muleContext));
        String uri = "&myNamedConcreateEndpoint";
        EndpointFactory endpointFactory = new DefaultEndpointFactory();
        endpointFactory.setMuleContext(muleContext);
        ImmutableEndpoint ep = endpointFactory.getInboundEndpoint(uri);
        assertEquals(DefaultInboundEndpoint.class, ep.getClass());
        assertEquals(ep.getEndpointURI().getUri().toString(), "test://address");
        assertTrue(ep instanceof InboundEndpoint);
    }
View Full Code Here

    @Test
    public void testCreateOutboundEndpoint() throws Exception
    {
        String uri = "test://address";
        EndpointFactory endpointFactory = new DefaultEndpointFactory();
        endpointFactory.setMuleContext(muleContext);
        ImmutableEndpoint ep = endpointFactory.getOutboundEndpoint(uri);
        assertEquals(DefaultOutboundEndpoint.class, ep.getClass());
        assertEquals(ep.getEndpointURI().getUri().toString(), "test://address");
        assertTrue(ep instanceof OutboundEndpoint);
    }
View Full Code Here

    public void testCreateoutboundEndpointFromGlobalEndpoint() throws Exception
    {
        muleContext.getRegistry().registerEndpointBuilder("myGlobalEndpoint",
                new EndpointURIEndpointBuilder("test://address", muleContext));
        String uri = "myGlobalEndpoint";
        EndpointFactory endpointFactory = new DefaultEndpointFactory();
        endpointFactory.setMuleContext(muleContext);
        ImmutableEndpoint ep = endpointFactory.getOutboundEndpoint(uri);
        assertEquals(DefaultOutboundEndpoint.class, ep.getClass());
        assertEquals(ep.getEndpointURI().getUri().toString(), "test://address");
        assertTrue(ep instanceof OutboundEndpoint);
    }
View Full Code Here

TOP

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

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.