org.mule.execution
Interface ThrottlingPhaseTemplate

All Superinterfaces:
FlowProcessingPhaseTemplate, MessageProcessTemplate
All Known Implementing Classes:
HttpMessageProcessTemplate, HttpsMessageProcessTemplate

public interface ThrottlingPhaseTemplate
extends FlowProcessingPhaseTemplate

Template that a MessageSource must implement if it wants to participate in the throttling phase when processing a message


Method Summary
 void discardMessageOnThrottlingExceeded()
          Discards the message due to ThrottlingPolicy configured for the MessageSource is exceeded
 void setThrottlingPolicyStatistics(long remainingRequestInCurrentPeriod, long maximumRequestAllowedPerPeriod, long timeUntilNextPeriodInMillis)
          Set up throttling policy state to be used by the MessageSource for debugging or information purpose.
 
Methods inherited from interface org.mule.execution.FlowProcessingPhaseTemplate
afterFailureProcessingFlow, afterFailureProcessingFlow, afterRouteEvent, afterSuccessfulProcessingFlow, beforeRouteEvent, getMuleEvent, getOriginalMessage, routeEvent
 

Method Detail

discardMessageOnThrottlingExceeded

void discardMessageOnThrottlingExceeded()
                                        throws MuleException
Discards the message due to ThrottlingPolicy configured for the MessageSource is exceeded

Throws:
MuleException

setThrottlingPolicyStatistics

void setThrottlingPolicyStatistics(long remainingRequestInCurrentPeriod,
                                   long maximumRequestAllowedPerPeriod,
                                   long timeUntilNextPeriodInMillis)
Set up throttling policy state to be used by the MessageSource for debugging or information purpose. Not all throttling policy supports statistics so this method may not be called

Parameters:
remainingRequestInCurrentPeriod - the remaining allowed messages in the current period
maximumRequestAllowedPerPeriod - the maximum allowed messages in a period
timeUntilNextPeriodInMillis - time in milliseconds until the next period starts


Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.