Package org.mule.api.service

Examples of org.mule.api.service.Service.start()


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

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

        service.start();
        assertEquals(1, connector.receivers.size());
        assertTrue(( connector.receivers.get("in")).isConnected());
        assertTrue(((AbstractMessageReceiver) connector.receivers.get("in")).isStarted());

        connector.stop();
View Full Code Here


       
        InboundEndpoint endpoint =
            muleContext.getEndpointFactory().getInboundEndpoint(url);
        ((CompositeMessageSource) relay.getMessageSource()).addSource(endpoint);
        relay.stop();
        relay.start();

        // then read from the queue that the polling receiver will write to
        MuleClient client = new MuleClient(muleContext);
        MuleMessage message = client.request("receive", 3000);
        checkReceivedMessage(message);
View Full Code Here

        List<Interceptor> interceptors = new ArrayList<Interceptor>();
        interceptors.add(new TestInterceptor(INTERCEPTOR_ONE));
        component.setInterceptors(interceptors);
        service.initialise();
        service.start();

        MuleEvent result = component.process(getTestEvent(""));

        assertEquals(SINGLE_INTERCEPTOR_RESULT, result.getMessageAsString());
    }
View Full Code Here

        interceptors.add(new TestInterceptor(INTERCEPTOR_ONE));
        interceptors.add(new TestInterceptor(INTERCEPTOR_TWO));
        interceptors.add(new TestInterceptor(INTERCEPTOR_THREE));
        component.setInterceptors(interceptors);
        service.initialise();
        service.start();

        MuleEvent result = component.process(getTestEvent(""));

        assertEquals(MULTIPLE_INTERCEPTOR_RESULT, result.getMessageAsString());
    }
View Full Code Here

        List<Interceptor> stackInterceptors = new ArrayList<Interceptor>();
        stackInterceptors.add(new TestInterceptor(INTERCEPTOR_ONE));
        interceptors.add(new InterceptorStack(stackInterceptors));
        component.setInterceptors(interceptors);
        service.initialise();
        service.start();

        MuleEvent result = component.process(getTestEvent(""));

        assertEquals(SINGLE_INTERCEPTOR_RESULT, result.getMessageAsString());
    }
View Full Code Here

        stackInterceptors.add(new TestInterceptor(INTERCEPTOR_TWO));
        stackInterceptors.add(new TestInterceptor(INTERCEPTOR_THREE));
        interceptors.add(new InterceptorStack(stackInterceptors));
        component.setInterceptors(interceptors);
        service.initialise();
        service.start();

        MuleEvent result = component.process(getTestEvent(""));

        assertEquals(MULTIPLE_INTERCEPTOR_RESULT, result.getMessageAsString());
    }
View Full Code Here

        stackInterceptors.add(new TestInterceptor(INTERCEPTOR_TWO));
        stackInterceptors.add(new TestInterceptor(INTERCEPTOR_THREE));
        interceptors.add(new InterceptorStack(stackInterceptors));
        component.setInterceptors(interceptors);
        service.initialise();
        service.start();

        MuleEvent result = component.process(getTestEvent(""));

        assertEquals(INTERCEPTOR_ONE + BEFORE + INTERCEPTOR_TWO + BEFORE + INTERCEPTOR_THREE + BEFORE
                     + INTERCEPTOR_ONE + BEFORE + INTERCEPTOR_TWO + BEFORE + INTERCEPTOR_THREE + BEFORE
View Full Code Here

    @Test
    public void testReceiversLifecycle() throws Exception
    {
        Service service = getTestService();
        service.start();
        try
        {
            connector.registerListener(getTestInboundEndpoint("in", "test://in"), getSensingNullMessageProcessor(), service);

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

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

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

        service.start();
        assertEquals(1, connector.receivers.size());
        assertTrue((connector.receivers.get("in")).isConnected());
        assertTrue(((AbstractMessageReceiver) connector.receivers.get("in")).isStarted());

        connector.stop();
View Full Code Here

        assertTrue(connector.isStarted());
        MessageReceiver[] receivers = connector.getReceivers("*stopped*");
        assertEquals(0, receivers.length);

        // Start the service.
        c.start();
        assertTrue(c.isStarted());
        assertFalse(c.isStopped());
        assertFalse(c.isPaused());

        // The listeners should now be registered and started.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.