/** * Returns the message payload for this event * * @return the message payload for this event */ public MuleMessage getMessage() { return event.getMessage(); }
public EventVariableResolverFactory(ParserConfiguration parserConfiguration, MuleContext muleContext, MuleEvent event) { super(parserConfiguration, muleContext, event.getMessage()); this.event = event; }
public VariableVariableResolverFactory(ParserConfiguration parserConfiguration, MuleContext muleContext, MuleEvent event) { this.message = event.getMessage(); }
public boolean evaluate(Object object) { return !VoidMuleEvent.getInstance().equals(object) && object != null && ((MuleEvent) object).getMessage() != null; } });
public MuleEvent process(MuleEvent event) throws MuleException { event.getMessage().setOutboundProperty(MuleProperties.MULE_ROOT_MESSAGE_ID_PROPERTY, event.getMessage().getMessageRootId()); return event; }
protected void nullifyExceptionPayloadIfRequired(MuleEvent event) { if (this.handleException) { event.getMessage().setExceptionPayload(null); } }
public Object process() throws Exception { MuleEvent muleEvent; muleEvent = new DefaultMuleEvent(event.getMessage(), event); return chain.process(muleEvent).getMessage().getPayload(); }
public Object processWithExtraProperties(Map<String, Object> properties) throws Exception { MuleMessage muleMessage; muleMessage = event.getMessage(); for (String property : properties.keySet()) { muleMessage.setInvocationProperty(property, properties.get(property)); } MuleEvent muleEvent; muleEvent = new DefaultMuleEvent(muleMessage, event); return chain.process(muleEvent).getMessage().getPayload(); }
private void addLock(MuleEvent event) { String correlationId = getAsyncReplyCorrelationId(event); locks.put(correlationId, new RequestReplyLatch(event.getMessage().getCorrelationGroupSize(), event.getMessage().getCorrelationSequence())); }
public DefaultMuleEvent(MuleEvent rewriteEvent, FlowConstruct flowConstruct, ReplyToHandler replyToHandler, Object replyToDestination, boolean synchronous) { this(rewriteEvent.getMessage(), rewriteEvent, flowConstruct, rewriteEvent.getSession(), synchronous, replyToHandler, replyToDestination, true, rewriteEvent.getExchangePattern()); }
protected void setUnauthenticated(MuleEvent event) { String realmHeader = "Basic realm="; if (realm != null) { realmHeader += "\"" + realm + "\""; } MuleMessage msg = event.getMessage(); msg.setOutboundProperty(HttpConstants.HEADER_WWW_AUTHENTICATE, realmHeader); msg.setOutboundProperty(HttpConnector.HTTP_STATUS_PROPERTY, HttpConstants.SC_UNAUTHORIZED); }
public MuleEvent process(MuleEvent event) throws MuleException { sessionHandler.storeSessionInfoToMessage(event.getSession(), event.getMessage()); return event; }
public DefaultMuleEvent(MuleEvent rewriteEvent, FlowConstruct flowConstruct) { this(rewriteEvent.getMessage(), rewriteEvent, flowConstruct, rewriteEvent.getSession(), rewriteEvent.isSynchronous()); }
protected void setAsyncReplyProperties(MuleEvent event) throws MuleException { event.getMessage().setReplyTo(getReplyTo()); event.getMessage().setOutboundProperty(MuleProperties.MULE_REPLY_TO_REQUESTOR_PROPERTY, event.getFlowConstruct().getName()); String correlation = event.getFlowConstruct().getMessageInfoMapping().getCorrelationId( event.getMessage()); event.getMessage().setCorrelationId(correlation); }
@Override public boolean evaluate(Object object) { if (VoidMuleEvent.getInstance().equals(object) || object == null) { return false; } MuleEvent event = (MuleEvent) object; ExceptionPayload ep = event.getMessage().getExceptionPayload(); return ep != null && ep.getException() != null; } };
public DefaultMuleEvent(MuleEvent rewriteEvent, FlowConstruct flowConstruct, ReplyToHandler replyToHandler, Object replyToDestination) { this(rewriteEvent.getMessage(), rewriteEvent, flowConstruct, rewriteEvent.getSession(), rewriteEvent.isSynchronous(), replyToHandler, replyToDestination, true, rewriteEvent.getExchangePattern()); }
private MuleEvent cloneEventForRouting(MuleEvent event, MessageProcessor mp) throws MessagingException { return createEventToRoute(event, cloneMessage(event, event.getMessage(), getMuleContext()), mp); } }
@Override protected MuleEvent handleUnaccepted(MuleEvent event) throws LifecycleException { throw new LifecycleException(CoreMessages.isStopped(getStartableName(startable)), event.getMessage()); }
public Object process(Object payload, Map<String, Object> properties) throws Exception { MuleMessage muleMessage; muleMessage = new DefaultMuleMessage(payload, muleContext); for (String property : properties.keySet()) { muleMessage.setInvocationProperty(property, properties.get(property)); } MuleEvent muleEvent; muleEvent = new DefaultMuleEvent(muleMessage, event); return chain.process(muleEvent).getMessage().getPayload(); }
private MuleEvent createMessageCollectionWithSingleMessage(MuleEvent event, MuleContext muleContext) { MuleMessageCollection coll = new DefaultMessageCollection(muleContext); coll.addMessage(event.getMessage()); event.setMessage(coll); return OptimizedRequestContext.unsafeSetEvent(event); }