Package com.eternus.ratelimit

Examples of com.eternus.ratelimit.Token


    /**
     * {@inheritDoc}
     */
    public Token getToken(Key key) {
        Token token = delegate.getToken(key);

        if (token.isUsable()) {
            sendNotification(new Notification(JMX_MONITOR_RATE_LIMIT_SERVICE_TYPE, this, getSequenceNumber(),
                    "allowed request " + key));
        } else {
            sendNotification(new Notification(MonitorNotification.THRESHOLD_VALUE_EXCEEDED, this, getSequenceNumber(),
                    "denied request " + key));
View Full Code Here

TOP

Related Classes of com.eternus.ratelimit.Token

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.