Examples of UMOMessageDispatcher


Examples of org.mule.umo.provider.UMOMessageDispatcher

*/
public class MuleDispatcherComponent extends AbstractEndpointComponent implements MessageListener {

    public void onMessage(MessageExchange messageExchange) throws MessagingException {
        try {
            UMOMessageDispatcher dispatcher = endpoint.getConnector().getDispatcher(endpoint.getEndpointURI().getAddress());
            NormalizedMessage out = getOutMessage(messageExchange);
            UMOMessage message = JbiUtils.createMessage(out);
            UMOEvent event = new MuleEvent(message, endpoint, new MuleSession(), endpoint.isSynchronous());
            if (endpoint.isSynchronous()) {
                UMOMessage result = dispatcher.send(event);
                //todo send result back
            } else {
                dispatcher.dispatch(event);
            }
        } catch (Exception e) {
            error(messageExchange, e);
        }
    }
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.