All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tacitknowledge.slowlight.proxyserver.metrics.OutThroughputHandler Maven / Gradle / Ivy

The newest version!
package com.tacitknowledge.slowlight.proxyserver.metrics;

import com.tacitknowledge.slowlight.proxyserver.config.HandlerConfig;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelPromise;

/**
 * @author Pavel Sorocun ([email protected])
 */
public class OutThroughputHandler extends ThroughputHandler
{
    public OutThroughputHandler(final HandlerConfig handlerConfig)
    {
        super(handlerConfig);
    }

    @Override
    public void write(final ChannelHandlerContext ctx, final Object msg, final ChannelPromise promise) throws Exception
    {
        updateThroughputMetric(msg);
        ctx.write(msg, promise);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy