Package org.mule

Examples of org.mule.DefaultMuleEventContext


    }

    public Object invoke(MuleEvent event) throws MuleException
    {
        // Invoke method
        MuleEventContext eventContext = new DefaultMuleEventContext(event);
        Object result;
        try
        {
            if (componentObject == null)
            {
View Full Code Here


    }

    @Override
    protected Object invokeComponentInstance(MuleEvent event) throws Exception
    {
        Object result = ((Callable) objectFactory.getInstance(muleContext)).onCall(new DefaultMuleEventContext(event));
        if (result instanceof VoidResult)
        {
            // This will rewire the current message
            return event.getMessage();
        }
View Full Code Here

            for (String s : attachments.keySet())
            {
                message.addOutboundAttachment(s, attachments.get(s));
            }
        }
        return new DefaultMuleEventContext(new DefaultMuleEvent(message, getTestInboundEndpoint("null"), new DefaultMuleSession(muleContext)));
    }
View Full Code Here

        EndpointBuilder endpointBuilder = new EndpointURIEndpointBuilder(tempUrl, muleContext);
        endpointBuilder.setExchangePattern(MessageExchangePattern.REQUEST_RESPONSE);
        OutboundEndpoint outboundEndpoint = endpointBuilder.buildOutboundEndpoint();

        MuleEventContext eventContext = new DefaultMuleEventContext(event);
        result = eventContext.sendEvent(
            new DefaultMuleMessage(requestBody, event.getMessage(), muleContext), outboundEndpoint);
        if (isErrorPayload(result))
        {
            handleException(new RestServiceException(CoreMessages.failedToInvokeRestService(tempUrl),
                event), result);
View Full Code Here

    public void populateBindings(Bindings bindings, MuleEvent event)
    {
        populateBindings(bindings, event.getMessage());
        bindings.put("originalPayload", event.getMessage().getPayload());
        bindings.put("payload", event.getMessage().getPayload());
        bindings.put("eventContext", new DefaultMuleEventContext(event));
        bindings.put("id", event.getId());
        bindings.put("flowConstruct", event.getFlowConstruct());
        if (event.getFlowConstruct() instanceof Service)
        {
            bindings.put("service", event.getFlowConstruct());
View Full Code Here

    public void populateBindings(Bindings bindings, MuleEvent event)
    {
        populateBindings(bindings, event.getMessage());
        bindings.put("originalPayload", event.getMessage().getPayload());
        bindings.put("payload", event.getMessage().getPayload());
        bindings.put("eventContext", new DefaultMuleEventContext(event));
        bindings.put("id", event.getId());
        bindings.put("flowConstruct", event.getFlowConstruct());
        if (event.getFlowConstruct() instanceof Service)
        {
            bindings.put("service", event.getFlowConstruct());
View Full Code Here

    }

    @Override
    protected Object invokeComponentInstance(MuleEvent event) throws Exception
    {
        Object result = ((Callable) objectFactory.getInstance(muleContext)).onCall(new DefaultMuleEventContext(event));
        if (result instanceof VoidResult)
        {
            // This will rewire the current message
            return event.getMessage();
        }
View Full Code Here

    }

    public Object invoke(MuleEvent event) throws MuleException
    {
        // Invoke method
        MuleEventContext eventContext = new DefaultMuleEventContext(event);
        Object result;
        try
        {
            if (componentObject == null)
            {
View Full Code Here

        EndpointBuilder endpointBuilder = new EndpointURIEndpointBuilder(tempUrl, muleContext);
        endpointBuilder.setExchangePattern(MessageExchangePattern.REQUEST_RESPONSE);
        OutboundEndpoint outboundEndpoint = endpointBuilder.buildOutboundEndpoint();

        MuleEventContext eventContext = new DefaultMuleEventContext(event);
        result = eventContext.sendEvent(
            new DefaultMuleMessage(requestBody, event.getMessage(), muleContext), outboundEndpoint);
        if (isErrorPayload(result))
        {
            handleException(new RestServiceException(CoreMessages.failedToInvokeRestService(tempUrl),
                event), result);
View Full Code Here

            for (String s : attachments.keySet())
            {
                message.addOutboundAttachment(s, attachments.get(s));
            }
        }
        return new DefaultMuleEventContext(new DefaultMuleEvent(message, getTestInboundEndpoint("null"),
            (FlowConstruct) null));
    }
View Full Code Here

TOP

Related Classes of org.mule.DefaultMuleEventContext

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.