public class HttpMessageProcessorTemplate extends Object implements AsyncResponseFlowProcessingPhaseTemplate, ThrottlingPhaseTemplate
| Modifier and Type | Field and Description |
|---|---|
static String |
MESSAGE_DISCARD_MESSAGE_BODY |
static String |
MESSAGE_DISCARD_REASON_PHRASE |
static int |
MESSAGE_DISCARD_STATUS_CODE |
static String |
X_RATE_LIMIT_LIMIT_HEADER |
static String |
X_RATE_LIMIT_REMAINING_HEADER |
static String |
X_RATE_LIMIT_RESET_HEADER |
| Constructor and Description |
|---|
HttpMessageProcessorTemplate(Event sourceMuleEvent,
Processor messageProcessor,
HttpResponseReadyCallback responseReadyCallback,
HttpResponseBuilder responseBuilder,
HttpResponseBuilder errorResponseBuilder) |
| Modifier and Type | Method and Description |
|---|---|
protected HttpResponse |
buildErrorResponse() |
protected HttpResponse |
buildResponse(Event muleEvent,
HttpResponseBuilder responseBuilder,
ResponseCompletionCallback responseCompletationCallback) |
void |
discardMessageOnThrottlingExceeded() |
protected HttpResponse |
doBuildResponse(Event muleEvent,
HttpResponseBuilder responseBuilder,
ResponseCompletionCallback responseCompletationCallback) |
Event |
getEvent() |
Event |
routeEvent(Event muleEvent) |
void |
sendFailureResponseToClient(MessagingException messagingException,
ResponseCompletionCallback responseCompletationCallback) |
void |
sendResponseToClient(Event event,
ResponseCompletionCallback responseCompletationCallback) |
void |
setThrottlingPolicyStatistics(long remainingRequestInCurrentPeriod,
long maximumRequestAllowedPerPeriod,
long timeUntilNextPeriodInMillis) |
public static final int MESSAGE_DISCARD_STATUS_CODE
public static final String MESSAGE_DISCARD_MESSAGE_BODY
public static final String MESSAGE_DISCARD_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 HttpMessageProcessorTemplate(Event sourceMuleEvent, Processor messageProcessor, HttpResponseReadyCallback responseReadyCallback, HttpResponseBuilder responseBuilder, HttpResponseBuilder errorResponseBuilder)
public Event getEvent() throws org.mule.runtime.api.exception.MuleException
getEvent in interface AsyncResponseFlowProcessingPhaseTemplategetEvent in interface ThrottlingPhaseTemplateorg.mule.runtime.api.exception.MuleExceptionpublic Event routeEvent(Event muleEvent) throws org.mule.runtime.api.exception.MuleException
routeEvent in interface AsyncResponseFlowProcessingPhaseTemplateorg.mule.runtime.api.exception.MuleExceptionpublic void sendResponseToClient(Event event, ResponseCompletionCallback responseCompletationCallback) throws org.mule.runtime.api.exception.MuleException
sendResponseToClient in interface AsyncResponseFlowProcessingPhaseTemplateorg.mule.runtime.api.exception.MuleExceptionprotected HttpResponse buildErrorResponse()
protected HttpResponse buildResponse(Event muleEvent, HttpResponseBuilder responseBuilder, ResponseCompletionCallback responseCompletationCallback)
protected HttpResponse doBuildResponse(Event muleEvent, HttpResponseBuilder responseBuilder, ResponseCompletionCallback responseCompletationCallback)
public void sendFailureResponseToClient(MessagingException messagingException, ResponseCompletionCallback responseCompletationCallback) throws org.mule.runtime.api.exception.MuleException
sendFailureResponseToClient in interface AsyncResponseFlowProcessingPhaseTemplateorg.mule.runtime.api.exception.MuleExceptionpublic void discardMessageOnThrottlingExceeded()
throws org.mule.runtime.api.exception.MuleException
discardMessageOnThrottlingExceeded in interface ThrottlingPhaseTemplateorg.mule.runtime.api.exception.MuleExceptionpublic void setThrottlingPolicyStatistics(long remainingRequestInCurrentPeriod,
long maximumRequestAllowedPerPeriod,
long timeUntilNextPeriodInMillis)
setThrottlingPolicyStatistics in interface ThrottlingPhaseTemplateCopyright © 2003–2016 MuleSoft, Inc.. All rights reserved.