Examples of OutboundRouterCollection


Examples of org.mule.api.routing.OutboundRouterCollection

    {
        Object serviceFlow = muleContext.getRegistry().lookupObject("TestComponent4");
        if (serviceFlow instanceof Service)
        {
            assertNotNull(serviceFlow);
            OutboundRouterCollection outboundRouter = (OutboundRouterCollection) ((Service) serviceFlow).getOutboundMessageProcessor();
            assertNotNull(outboundRouter);
            assertEquals(1, outboundRouter.getRoutes().size());
            // first Router
            OutboundRouter router = (OutboundRouter) outboundRouter.getRoutes().get(0);
            assertEquals(1, router.getRoutes().size());
            ImmutableEndpoint endpoint = (ImmutableEndpoint) router.getRoutes().get(0);
            assertEquals("udp", endpoint.getConnector().getProtocol().toLowerCase());
            assertEquals("udp://localhost:56731", endpoint.getEndpointURI().getAddress());
            // cannot get this to work and get axis tests to work
View Full Code Here

Examples of org.mule.api.routing.OutboundRouterCollection

    {
        Object serviceFlow = muleContext.getRegistry().lookupObject("TestComponent5");
        if (serviceFlow instanceof Service)
        {
            assertNotNull(serviceFlow);
            OutboundRouterCollection outboundRouter = (OutboundRouterCollection) ((Service) serviceFlow).getOutboundMessageProcessor();
            assertNotNull(outboundRouter);
            assertEquals(1, outboundRouter.getRoutes().size());
            // first Router
            OutboundRouter router = (OutboundRouter) outboundRouter.getRoutes().get(0);
            assertEquals(1, router.getRoutes().size());
            ImmutableEndpoint endpoint = (ImmutableEndpoint) router.getRoutes().get(0);
            assertEquals(TcpConnector.TCP, endpoint.getConnector().getProtocol().toLowerCase());
            assertEquals("tcp://localhost:45431", endpoint.getEndpointURI().getAddress());
            // cannot get this to work and get axis tests to work
View Full Code Here

Examples of org.mule.api.routing.OutboundRouterCollection

    public void testComponent3RouterEndpoints() throws Exception
    {
        Service service = muleContext.getRegistry().lookupService("TestComponent3");

        assertNotNull(service);
        OutboundRouterCollection outboundRouter = (OutboundRouterCollection) service.getOutboundMessageProcessor();
        assertNotNull(outboundRouter);
        assertEquals(2, outboundRouter.getRoutes().size());
        // first Router
        OutboundRouter router1 = (OutboundRouter) outboundRouter.getRoutes().get(0);
        assertEquals(1, router1.getRoutes().size());
        ImmutableEndpoint endpoint = (ImmutableEndpoint) router1.getRoutes().get(0);
        assertEquals("tcp", endpoint.getConnector().getProtocol().toLowerCase());
        assertEquals("tcp://localhost:60201", endpoint.getEndpointURI().getAddress());
        assertTrue(endpoint instanceof OutboundEndpoint);

        // second Router
        OutboundRouter router2 = (OutboundRouter) outboundRouter.getRoutes().get(1);
        assertEquals(2, router2.getRoutes().size());
        endpoint = (ImmutableEndpoint) router2.getRoutes().get(0);
        assertEquals("udp", endpoint.getConnector().getProtocol().toLowerCase());
        assertEquals("udp://localhost:56731", endpoint.getEndpointURI().getAddress());
        assertTrue(endpoint instanceof OutboundEndpoint);
View Full Code Here

Examples of org.mule.api.routing.OutboundRouterCollection

    public void testComponent4OutboundEndpoint() throws Exception
    {
        Service service = muleContext.getRegistry().lookupService("TestComponent4");

        assertNotNull(service);
        OutboundRouterCollection outboundRouter = (OutboundRouterCollection) service.getOutboundMessageProcessor();
        assertNotNull(outboundRouter);
        assertEquals(1, outboundRouter.getRoutes().size());
        // first Router
        OutboundRouter router = (OutboundRouter) outboundRouter.getRoutes().get(0);
        assertEquals(1, router.getRoutes().size());
        ImmutableEndpoint endpoint = (ImmutableEndpoint) router.getRoutes().get(0);
        assertEquals("udp", endpoint.getConnector().getProtocol().toLowerCase());
        assertEquals("udp://localhost:56731", endpoint.getEndpointURI().getAddress());
        // cannot get this to work and get axis tests to work
View Full Code Here

Examples of org.mule.api.routing.OutboundRouterCollection

    public void testComponent5RouterEndpoints() throws Exception
    {
        Service service = muleContext.getRegistry().lookupService("TestComponent5");

        assertNotNull(service);
        OutboundRouterCollection outboundRouter = (OutboundRouterCollection) service.getOutboundMessageProcessor();
        assertNotNull(outboundRouter);
        assertEquals(1, outboundRouter.getRoutes().size());
        // first Router
        OutboundRouter router = (OutboundRouter) outboundRouter.getRoutes().get(0);
        assertEquals(1, router.getRoutes().size());
        ImmutableEndpoint endpoint = (ImmutableEndpoint) router.getRoutes().get(0);
        assertEquals(TcpConnector.TCP, endpoint.getConnector().getProtocol().toLowerCase());
        assertEquals("tcp://localhost:45431", endpoint.getEndpointURI().getAddress());
        // cannot get this to work and get axis tests to work
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.