public class HttpMessageProcessTemplate extends org.mule.transport.AbstractTransportMessageProcessTemplate<HttpMessageReceiver,HttpConnector> implements org.mule.execution.RequestResponseFlowProcessingPhaseTemplate, org.mule.execution.ThrottlingPhaseTemplate, org.mule.execution.EndPhaseTemplate
| Modifier and Type | Field and Description |
|---|---|
static int |
MESSAGE_DISCARD_STATUS_CODE |
static String |
MESSAGE_THROTTLED_REASON_PHRASE |
static String |
X_RATE_LIMIT_LIMIT_HEADER |
static String |
X_RATE_LIMIT_REMAINING_HEADER |
static String |
X_RATE_LIMIT_RESET_HEADER |
| Constructor and Description |
|---|
HttpMessageProcessTemplate(HttpMessageReceiver messageReceiver,
HttpServerConnection httpServerConnection) |
| Modifier and Type | Method and Description |
|---|---|
Object |
acquireMessage() |
void |
afterFailureProcessingFlow(org.mule.api.MuleException exception) |
void |
awaitTermination() |
org.mule.api.MuleEvent |
beforeRouteEvent(org.mule.api.MuleEvent muleEvent) |
protected org.mule.api.MuleMessage |
createMessageFromSource(Object message) |
void |
discardInvalidMessage() |
void |
discardMessageOnThrottlingExceeded() |
protected HttpResponse |
doBad(RequestLine requestLine) |
protected HttpServerConnection |
getHttpServerConnection() |
void |
messageProcessingEnded() |
protected String |
processRelativePath(String contextPath,
String path) |
protected void |
processRemoteAddresses(org.mule.api.MuleMessage muleMessage)
For a given MuleMessage will set the
MULE_REMOTE_CLIENT_ADDRESS property taking into consideration
if the header X-Forwarded-For is present in the request or not. |
void |
sendFailureResponseToClient(org.mule.api.MessagingException messagingException) |
void |
sendResponseToClient(org.mule.api.MuleEvent responseMuleEvent) |
void |
setThrottlingPolicyStatistics(long remainingRequestInCurrentPeriod,
long maximumRequestAllowedPerPeriod,
long timeUntilNextPeriodInMillis) |
protected HttpResponse |
transformResponse(Object response) |
boolean |
validateMessage() |
afterFailureProcessingFlow, afterRouteEvent, afterSuccessfulProcessingFlow, createEventFromMuleMessage, getConnector, getFlowConstruct, getInboundEndpoint, getMessageReceiver, getMuleContext, getMuleEvent, getOriginalMessage, getOutputStream, propagateRootMessageIdProperty, routeEvent, warnIfMuleClientSendUsedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic static final int MESSAGE_DISCARD_STATUS_CODE
public static final String MESSAGE_THROTTLED_REASON_PHRASE
public static final String X_RATE_LIMIT_LIMIT_HEADER
public static final String X_RATE_LIMIT_REMAINING_HEADER
public static final String X_RATE_LIMIT_RESET_HEADER
public HttpMessageProcessTemplate(HttpMessageReceiver messageReceiver, HttpServerConnection httpServerConnection)
public void sendResponseToClient(org.mule.api.MuleEvent responseMuleEvent)
throws org.mule.api.MuleException
sendResponseToClient in interface org.mule.execution.RequestResponseFlowProcessingPhaseTemplateorg.mule.api.MuleExceptionpublic void sendFailureResponseToClient(org.mule.api.MessagingException messagingException)
throws org.mule.api.MuleException
sendFailureResponseToClient in interface org.mule.execution.RequestResponseFlowProcessingPhaseTemplateorg.mule.api.MuleExceptionpublic void afterFailureProcessingFlow(org.mule.api.MuleException exception)
throws org.mule.api.MuleException
afterFailureProcessingFlow in interface org.mule.execution.FlowProcessingPhaseTemplateafterFailureProcessingFlow in class org.mule.transport.AbstractTransportMessageProcessTemplate<HttpMessageReceiver,HttpConnector>org.mule.api.MuleExceptionpublic org.mule.api.MuleEvent beforeRouteEvent(org.mule.api.MuleEvent muleEvent)
throws org.mule.api.MuleException
beforeRouteEvent in interface org.mule.execution.FlowProcessingPhaseTemplatebeforeRouteEvent in class org.mule.transport.AbstractTransportMessageProcessTemplate<HttpMessageReceiver,HttpConnector>org.mule.api.MuleExceptionprotected HttpResponse transformResponse(Object response) throws org.mule.api.MuleException
org.mule.api.MuleExceptionprotected org.mule.api.MuleMessage createMessageFromSource(Object message) throws org.mule.api.MuleException
createMessageFromSource in class org.mule.transport.AbstractTransportMessageProcessTemplate<HttpMessageReceiver,HttpConnector>org.mule.api.MuleExceptionprotected void processRemoteAddresses(org.mule.api.MuleMessage muleMessage)
MULE_REMOTE_CLIENT_ADDRESS property taking into consideration
if the header X-Forwarded-For is present in the request or not. In case it is, this method will
also set the MULE_PROXY_ADDRESS property. If a proxy address is not passed in
X-Forwarded-For, the connection address will be set as MULE_PROXY_ADDRESS.muleMessage - MuleMessage to be enrichedpublic Object acquireMessage() throws org.mule.api.MuleException
acquireMessage in class org.mule.transport.AbstractTransportMessageProcessTemplate<HttpMessageReceiver,HttpConnector>org.mule.api.MuleExceptionpublic boolean validateMessage()
validateMessage in interface org.mule.execution.ValidationPhaseTemplatevalidateMessage in class org.mule.transport.AbstractTransportMessageProcessTemplate<HttpMessageReceiver,HttpConnector>public void discardInvalidMessage()
throws org.mule.api.MuleException
discardInvalidMessage in interface org.mule.execution.ValidationPhaseTemplatediscardInvalidMessage in class org.mule.transport.AbstractTransportMessageProcessTemplate<HttpMessageReceiver,HttpConnector>org.mule.api.MuleExceptionprotected HttpResponse doBad(RequestLine requestLine) throws org.mule.api.MuleException
org.mule.api.MuleExceptionprotected HttpServerConnection getHttpServerConnection()
public void discardMessageOnThrottlingExceeded()
throws org.mule.api.MuleException
discardMessageOnThrottlingExceeded in interface org.mule.execution.ThrottlingPhaseTemplateorg.mule.api.MuleExceptionpublic void setThrottlingPolicyStatistics(long remainingRequestInCurrentPeriod,
long maximumRequestAllowedPerPeriod,
long timeUntilNextPeriodInMillis)
setThrottlingPolicyStatistics in interface org.mule.execution.ThrottlingPhaseTemplatepublic void messageProcessingEnded()
messageProcessingEnded in interface org.mule.execution.EndPhaseTemplatepublic void awaitTermination()
throws InterruptedException
InterruptedExceptionCopyright © 2003–2016 MuleSoft, Inc.. All rights reserved.