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(MuleEvent sourceMuleEvent,
MessageProcessor messageProcessor,
HttpResponseReadyCallback responseReadyCallback,
HttpResponseBuilder responseBuilder,
HttpResponseBuilder errorResponseBuilder) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterFailureProcessingFlow(Exception exception) |
protected HttpResponse |
buildErrorResponse() |
protected HttpResponse |
buildResponse(MuleEvent muleEvent,
HttpResponseBuilder responseBuilder,
ResponseCompletionCallback responseCompletationCallback) |
void |
discardMessageOnThrottlingExceeded() |
protected HttpResponse |
doBuildResponse(MuleEvent muleEvent,
HttpResponseBuilder responseBuilder,
ResponseCompletionCallback responseCompletationCallback) |
MuleEvent |
getMuleEvent() |
MuleEvent |
routeEvent(MuleEvent muleEvent) |
void |
sendFailureResponseToClient(MessagingException messagingException,
ResponseCompletionCallback responseCompletationCallback) |
void |
sendResponseToClient(MuleEvent muleEvent,
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(MuleEvent sourceMuleEvent, MessageProcessor messageProcessor, HttpResponseReadyCallback responseReadyCallback, HttpResponseBuilder responseBuilder, HttpResponseBuilder errorResponseBuilder)
public MuleEvent getMuleEvent() throws MuleException
getMuleEvent in interface AsyncResponseFlowProcessingPhaseTemplategetMuleEvent in interface ThrottlingPhaseTemplateMuleExceptionpublic MuleEvent routeEvent(MuleEvent muleEvent) throws MuleException
routeEvent in interface AsyncResponseFlowProcessingPhaseTemplateMuleExceptionpublic void afterFailureProcessingFlow(Exception exception)
afterFailureProcessingFlow in interface AsyncResponseFlowProcessingPhaseTemplatepublic void sendResponseToClient(MuleEvent muleEvent, ResponseCompletionCallback responseCompletationCallback) throws MuleException
sendResponseToClient in interface AsyncResponseFlowProcessingPhaseTemplateMuleExceptionprotected HttpResponse buildErrorResponse()
protected HttpResponse buildResponse(MuleEvent muleEvent, HttpResponseBuilder responseBuilder, ResponseCompletionCallback responseCompletationCallback)
protected HttpResponse doBuildResponse(MuleEvent muleEvent, HttpResponseBuilder responseBuilder, ResponseCompletionCallback responseCompletationCallback)
public void sendFailureResponseToClient(MessagingException messagingException, ResponseCompletionCallback responseCompletationCallback) throws MuleException
sendFailureResponseToClient in interface AsyncResponseFlowProcessingPhaseTemplateMuleExceptionpublic void discardMessageOnThrottlingExceeded()
throws MuleException
discardMessageOnThrottlingExceeded in interface ThrottlingPhaseTemplateMuleExceptionpublic void setThrottlingPolicyStatistics(long remainingRequestInCurrentPeriod,
long maximumRequestAllowedPerPeriod,
long timeUntilNextPeriodInMillis)
setThrottlingPolicyStatistics in interface ThrottlingPhaseTemplateCopyright © 2003–2016 MuleSoft, Inc.. All rights reserved.