public Object put(String key, Object value) { message.setOutboundProperty(key, value); return value; }
public void storeSessionInfoToMessage(MuleSession session, MuleMessage message) throws MuleException { message.setOutboundProperty(MuleProperties.MULE_SESSION_PROPERTY, session); }
public void setHeader(String name, String value) { message.setOutboundProperty(name, value); }
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); }
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 Object call() throws Exception { message.setOutboundProperty(MuleProperties.MULE_EVENT_TIMEOUT_PROPERTY, timeout); return sendEvent(message, endpointName); } };
public Object call() throws Exception { message.setOutboundProperty(MuleProperties.MULE_EVENT_TIMEOUT_PROPERTY, timeout); return sendEvent(message); } };
public Object call() throws Exception { message.setOutboundProperty(MuleProperties.MULE_EVENT_TIMEOUT_PROPERTY, timeout); return sendEvent(message, endpointUri); } };
protected void setPropertyFromEndpoint(MuleEvent event, MuleMessage msg, String prop) { Object o = msg.getOutboundProperty(prop); if (o == null) { o = endpoint.getProperty(prop); if (o != null) { msg.setOutboundProperty(prop, o); } } }
@Override public void processMatch(String matchedValue) { message.setOutboundProperty(matchedValue, message.getInboundProperty(matchedValue), message.getPropertyDataType(matchedValue, PropertyScope.INBOUND)); } });
public void storeSessionInfoToMessage(MuleSession session, MuleMessage message) throws MuleException { MuleContext muleContext = message.getMuleContext(); byte[] serializedSession = muleContext.getObjectSerializer().serialize( removeNonSerializableProperties(session, muleContext)); if (logger.isDebugEnabled()) { logger.debug("Adding serialized Session header to message: " + serializedSession); } message.setOutboundProperty(MuleProperties.MULE_SESSION_PROPERTY, serializedSession); }
public MuleEvent process(MuleEvent event) throws MuleException { event.getMessage().setOutboundProperty(MuleProperties.MULE_ROOT_MESSAGE_ID_PROPERTY, event.getMessage().getMessageRootId()); return event; }
protected void setCredentials(MuleMessage message) { if (credentials != null) { message.setOutboundProperty(MuleProperties.MULE_USER_PROPERTY, MuleCredentials.createHeader( credentials.getUsername(), credentials.getPassword())); } }
public Object doTransform(final MuleMessage message) throws Exception { for (final String inboundPropertyName : message.getInboundPropertyNames()) { if (StringUtils.startsWith(inboundPropertyName, MuleProperties.PROPERTY_PREFIX)) { continue; } message.setOutboundProperty(inboundPropertyName, message.getInboundProperty(inboundPropertyName)); } return message; } }
public Object call() throws Exception { MuleMessage muleMessage = new DefaultMuleMessage(message, event.getMessage(), event.getMuleContext()); muleMessage.setOutboundProperty(MuleProperties.MULE_EVENT_TIMEOUT_PROPERTY, timeout); return sendEvent(muleMessage); } };
public void handleMessage(Message message) throws Fault { MuleEvent event = (MuleEvent) message.getExchange().get(CxfConstants.MULE_EVENT); MuleMessage muleMsg = event.getMessage(); Collection<Attachment> atts = message.getAttachments(); if (atts != null && !atts.isEmpty()) { muleMsg.setInvocationProperty(CxfConstants.ATTACHMENTS, atts); muleMsg.setOutboundProperty(HttpConstants.HEADER_CONTENT_TYPE, muleMsg.getInboundProperty(HttpConstants.HEADER_CONTENT_TYPE)); } }
private HttpResponse buildFailureResponse(MuleEvent event, String description, int httpStatusCode) throws MuleException { event.getMessage().setOutboundProperty(HttpConnector.HTTP_STATUS_PROPERTY,httpStatusCode); event.getMessage().setPayload(description); return transformResponse(event.getMessage(), event); }
protected MuleEvent getEvent(MuleMessage message, MessageExchangePattern exchangePattern) throws MuleException { if (user != null) { message.setOutboundProperty(MuleProperties.MULE_USER_PROPERTY, MuleCredentials.createHeader(user.getUsername(), user.getPassword())); } return new DefaultMuleEvent(message, exchangePattern, new DefaultLocalMuleClient.MuleClientFlowConstruct(muleContext)); }
private void sendFailureResponseToClient(MessagingException exception, int httpStatus) throws IOException, MuleException { MuleEvent response = exception.getEvent(); response.getMessage().setPayload(exception.getMessage()); httpStatus = response.getMessage().getOutboundProperty(HttpConnector.HTTP_STATUS_PROPERTY) != null ? Integer.valueOf(response.getMessage().getOutboundProperty(HttpConnector.HTTP_STATUS_PROPERTY).toString()) : httpStatus; response.getMessage().setOutboundProperty(HttpConnector.HTTP_STATUS_PROPERTY, httpStatus); HttpResponse httpResponse = transformResponse(response.getMessage()); httpServerConnection.writeResponse(httpResponse, getThrottlingHeaders()); }
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); }