Package org.mule.api.endpoint

Examples of org.mule.api.endpoint.InboundEndpoint


                                binding = new CallInterfaceBinding(this.flow);
                                binding.setEndpoint(endpoint);
                            }
                            else
                            {
                                InboundEndpoint endpoint = parser.parseInboundEndpoint(metaData.getAnnotation(), Collections.EMPTY_MAP);
                                binding = new DynamicRequestInterfaceBinding();
                                binding.setEndpoint(endpoint);
                            }

                            binding.setInterface(getInterface());
View Full Code Here


        assertTrue("Did not find logging interceptor.", found);
    }
   
    public void testSpringRefs() throws Exception
    {
        InboundEndpoint endpoint = muleContext.getRegistry().get("clientEndpoint");
        FlowConfiguringMessageProcessor processor = (FlowConfiguringMessageProcessor) endpoint.getMessageProcessors().get(0);
        List inInterceptors = ((ProxyServiceFactoryBean) processor.getMessageProcessorBuilder()).getInInterceptors();
        assertEquals(muleContext.getRegistry().get("foo1"), inInterceptors.get(0));
        assertEquals(muleContext.getRegistry().get("foo3"), inInterceptors.get(1));
    }
View Full Code Here

    }

    public void testCreate() throws Exception
    {
        Service service = getTestService("orange", Orange.class);
        InboundEndpoint endpoint = getTestInboundEndpoint("Test");
        MessageReceiver receiver = getMessageReceiver();

        assertNotNull(receiver.getEndpoint());

        try
View Full Code Here

    }

    public void testReceiversServiceLifecycle() throws Exception
    {
        Service service = getTestService();
        InboundEndpoint endpoint = getTestInboundEndpoint("in", "test://in");
        ((CompositeMessageSource) service.getMessageSource()).addSource(endpoint);
        connector = (TestConnector) endpoint.getConnector();

        assertEquals(0, connector.receivers.size());

        connector.start();
        assertEquals(0, connector.receivers.size());
View Full Code Here

    }

    public void testRequestersLifecycle() throws Exception
    {
        InboundEndpoint in = getTestInboundEndpoint("in", "test://in", null, null, null, connector);

        // attempts to send/dispatch/request are made on a stopped/stopping connector
        // This should fail because the connector is not started!
        try
        {
            in.request(1000L);
            fail("cannot sent on a connector that is not started");
        }
        catch (LifecycleException e)
        {
            //Expected
        }


        assertEquals(0, connector.requesters.getNumIdle());

        // Dispatcher is not started or connected
        assertRequesterStartedConnected(in, false, false);

        connector.start();
        assertRequesterStartedConnected(in, true, true);

        assertEquals(1, connector.requesters.getNumIdle());

        InboundEndpoint in2 = getTestInboundEndpoint("in2", "test://in2", null, null, null, connector);
        in2.request(1000L);


        assertEquals(2, connector.requesters.getNumIdle());
        assertRequesterStartedConnected(in, true, true);
        assertRequesterStartedConnected(in2, true, true);
View Full Code Here

    }

    public void testRequesterFullLifecycle() throws Exception
    {
        InboundEndpoint in = getTestInboundEndpoint("out", "test://out", null, null, null, connector);

        MessageRequester requester = connector.getRequesterFactory().create(in);

        requester.initialise();
        assertTrue(requester.getLifecycleState().isInitialised());
View Full Code Here

        {
            final String wsdlAddress = wsdlAddressProvider.get(event);
            String wsdlString;

            final MuleContext muleContext = event.getMuleContext();
            final InboundEndpoint webServiceEndpoint = muleContext.getEndpointFactory().getInboundEndpoint(
                wsdlAddress);

            if (logger.isDebugEnabled())
            {
                logger.debug("Retrieving WSDL from web service with: " + webServiceEndpoint);
            }

            final MuleMessage replyWSDL = webServiceEndpoint.request(event.getTimeout());
            wsdlString = replyWSDL.getPayloadAsString();

            // create a new mule message with the new WSDL
            final String realWsdlAddress = wsdlAddress.split("\\?")[0];
            final String proxyWsdlAddress = event.getEndpoint().getEndpointURI().getUri().toString();
View Full Code Here

    public void testFlowConfig() throws Exception
    {
        Flow flowConstruct = muleContext.getRegistry().lookupObject("flowTest");
        assertNotNull(flowConstruct);
        assertTrue(flowConstruct.getMessageSource() instanceof InboundEndpoint);
        InboundEndpoint ep = ((InboundEndpoint)flowConstruct.getMessageSource());
        assertEquals(2, ep.getMessageProcessors().size());
        MessageProcessor mp = ep.getMessageProcessors().get(0);
        assertTrue(mp instanceof FeedSplitter);
        mp = ep.getMessageProcessors().get(1);
        assertTrue(mp instanceof MessageFilter);

        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");

        assertEquals(sdf.parse("2009-10-01"), ((EntryLastUpdatedFilter)((MessageFilter)mp).getFilter()).getLastUpdate());
View Full Code Here

{

    public void testInboundEndpointCache() throws MuleException
    {
        MuleClient muleClient = new MuleClient(muleContext);
        InboundEndpoint endpointa = muleClient.getInboundEndpoint("test://test1");
        InboundEndpoint endpointd = muleClient.getInboundEndpoint("test://test2");
        InboundEndpoint endpointb = muleClient.getInboundEndpoint("test://test1");
        InboundEndpoint endpointc = muleClient.getInboundEndpoint("test://test1");
        assertEquals(endpointa, endpointc);
        assertEquals(endpointb, endpointb);
        assertNotSame(endpointa, endpointd);
    }
View Full Code Here

        Service service = muleContext.getRegistry().lookupService("Test");
        assertNotNull(service);
        List endpoints = ((ServiceCompositeMessageSource) service.getMessageSource()).getEndpoints();
        assertEquals(1, endpoints.size());

        InboundEndpoint endpoint = (InboundEndpoint) endpoints.get(0);
        Filter filter = endpoint.getFilter();
        assertNotNull(filter);

        assertTrue(filter instanceof FilenameRegexFilter);
        final FilenameRegexFilter f = (FilenameRegexFilter) filter;
        assertEquals(false, f.isCaseSensitive());
View Full Code Here

TOP

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

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.