@Override
    protected void doApply(ApiRequest request, IPolicyContext context, TimeRestrictedAccessConfig config,
            IPolicyChain<ApiRequest> chain) {
        if (canProcessRequest(config, request.getDestination())) {
            super.doApply(request, context, config, chain);
        } else {
            IPolicyFailureFactoryComponent ffactory = context
                    .getComponent(IPolicyFailureFactoryComponent.class);
            String msg = Messages.i18n.format("TimeRestrictedAccessPolicy.Unavailable", //$NON-NLS-1$
                    request.getDestination());
            PolicyFailure failure = ffactory.createFailure(PolicyFailureType.Other,
                    PolicyFailureCodes.ACCESS_TIME_RESTRICTED, msg);
            chain.doFailure(failure);
        }
    }
@see io.apiman.gateway.engine.policies.AbstractMappedPolicy#doApply(io.apiman.gateway.engine.beans.ApiRequest,
     io.apiman.gateway.engine.policy.IPolicyContext, java.lang.Object,
     io.apiman.gateway.engine.policy.IPolicyChain)
gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/TimeRestrictedAccessPolicy.java