class ActiveLimitFilter implements Filter {

    @Override
    public Response filter(Caller<?> caller, Request request) {<FILL_FUNCTION_BODY>}

}

        int maxAcvitivyCount = caller.getUrl().getIntParameter(URLParamType.actives.getName(), URLParamType.actives.getIntValue());
        if (maxAcvitivyCount > 0) {
            int activeCount = RpcStats.getServiceStat(caller.getUrl()).getActiveCount();
            if (activeCount >= maxAcvitivyCount) {
                throw new MotanServiceException(String.format("Request(%s) active count exceed the limit (%s), referer:%s", request,
                        maxAcvitivyCount, caller.getUrl()), MotanErrorMsgConstant.SERVICE_REJECT, false);
            }
        }

        long startTime = System.currentTimeMillis();
        RpcStats.beforeCall(caller.getUrl(), request);
        try {
            Response rs = caller.call(request);
            RpcStats.afterCall(caller.getUrl(), request, true, System.currentTimeMillis() - startTime);
            return rs;
        } catch (RuntimeException re) {
            RpcStats.afterCall(caller.getUrl(), request, false, System.currentTimeMillis() - startTime);
            throw re;
        }

    
<no_super_class>