protected void doQuotaExceededFailure ( final IPolicyContext context , final TransferQuotaConfig config , final IPolicyChain < ? > chain , RateLimitResponse rtr ) { Map < String , String > responseHeaders = RateLimitingPolicy . responseHeaders ( config , rtr , defaultLimitHeader ( ) , defaultRemainingHeader ( ) , defaultResetHeader ( ) ) ; IPolicyFailureFactoryComponent failureFactory = context . getComponent ( IPolicyFailureFactoryComponent . class ) ; PolicyFailure failure = limitExceededFailure ( failureFactory ) ; failure . getHeaders ( ) . putAll ( responseHeaders ) ; chain . doFailure ( failure ) ; }
Called to send a quota exceeded failure .