Package org.mule.api.component

Examples of org.mule.api.component.InterfaceBinding


        List<InterfaceBinding> bindings= ((JavaComponent) service.getComponent()).getInterfaceBindings();
        assertNotNull(bindings);

        assertEquals(2, bindings.size());
        // check first Router
        InterfaceBinding route1 = bindings.get(0);
        assertEquals(FruitCleaner.class, route1.getInterface());
        assertEquals("wash", route1.getMethod());
        assertNotNull(route1.getEndpoint());
        // check second Router
        InterfaceBinding route2 = bindings.get(1);
        assertEquals(FruitCleaner.class, route2.getInterface());
        assertEquals("polish", route2.getMethod());
        assertNotNull(route1.getEndpoint());
    }
View Full Code Here


        MuleMessage message = createMuleMessage(args);

        // Some transports such as Axis, RMI and EJB can use the method information
        message.setInvocationProperty(MuleProperties.MULE_METHOD_PROPERTY, method.getName());

        InterfaceBinding router = routers.get(method.getName());
        if (router == null)
        {
            router = routers.get(DEFAULT_METHOD_NAME_TOKEN);
        }

        if (router == null)
        {
            throw new IllegalArgumentException(CoreMessages.cannotFindBindingForMethod(method.getName()).toString());
        }

        MuleEvent currentEvent = RequestContext.getEvent();
        MuleEvent replyEvent = router.process(new DefaultMuleEvent(message,currentEvent));

        if (replyEvent != null && !VoidMuleEvent.getInstance().equals(replyEvent)
            && replyEvent.getMessage() != null)
        {
            MuleMessage reply = replyEvent.getMessage();
View Full Code Here

TOP

Related Classes of org.mule.api.component.InterfaceBinding

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.