Package org.mule.api.service

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


        assertNotNull(message);
        assertEquals("Received: Test Client Send message", message.getPayloadAsString());

        // The SpringRegistry is read-only so we can't unregister the service!
        //muleContext.getRegistry().unregisterComponent("vmComponent");
        c.stop();

        try
        {
            client.send(endpoint, "Test Client Send message", null);
        }
View Full Code Here


        MessageReceiver[] receivers = connector.getReceivers("*started*");
        assertEquals(1, receivers.length);
        assertTrue(receivers[0].isConnected());

        // Stop service
        c.stop();
        assertFalse(c.isStarted());
        assertFalse(c.isPaused());
        assertTrue(c.isStopped());

        // Connector is still started, but no more receivers.
View Full Code Here

        for (String serviceName : serviceNames)
        {
            try
            {
                Service service = muleContext.getRegistry().lookupService(serviceName);
                service.stop();
                services.add(service);
            }
            catch (Exception e)
            {
                logger.error("Error '" + e.getMessage() + "' occured while stopping the service "
View Full Code Here

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

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

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

        logger.debug(url);
       
        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);
View Full Code Here

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

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

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

        MessageReceiver[] receivers = connector.getReceivers("*started*");
        assertEquals(1, receivers.length);
        assertTrue(receivers[0].isConnected());

        // Stop service
        c.stop();
        assertFalse(c.isStarted());
        assertFalse(c.isPaused());
        assertTrue(c.isStopped());

        // Connector is still started, but no more receivers.
View Full Code Here

    {
        FlowConstruct flowConstruct = getFlowConstruct(flowName);
        if (flowConstruct instanceof Service)
        {
            Service service = (Service) flowConstruct;
            service.stop();
        }
        else
        {
            Flow flow = (Flow) flowConstruct;
            flow.stop();
View Full Code Here

        for (String serviceName : serviceNames)
        {
            try
            {
                Service service = muleContext.getRegistry().lookupService(serviceName);
                service.stop();
                services.add(service);
            }
            catch (Exception e)
            {
                logger.error("Error '" + e.getMessage() + "' occured while stopping the service "
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.