Class PushConnection

java.lang.Object
com.netflix.zuul.netty.server.push.PushConnection

public class PushConnection extends Object
Author: Susheel Aroskar Date:
  • Field Details

    • TOKEN_BUCKET_RATE

      public static final com.netflix.config.CachedDynamicIntProperty TOKEN_BUCKET_RATE
    • TOKEN_BUCKET_WINDOW

      public static final com.netflix.config.CachedDynamicIntProperty TOKEN_BUCKET_WINDOW
  • Constructor Details

    • PushConnection

      public PushConnection(PushProtocol pushProtocol, io.netty.channel.ChannelHandlerContext ctx)
  • Method Details

    • getSecureToken

      public String getSecureToken()
    • setSecureToken

      public void setSecureToken(String secureToken)
    • isRateLimited

      public boolean isRateLimited()
      Implementation of TokenBucket algorithm to do rate limiting: http://stackoverflow.com/a/668327
      Returns:
      true if should be rate limited, false if it is OK to send the message
    • sendPushMessage

      public io.netty.channel.ChannelFuture sendPushMessage(io.netty.buffer.ByteBuf mesg)
    • sendPushMessage

      public io.netty.channel.ChannelFuture sendPushMessage(String mesg)
    • sendPing

      public io.netty.channel.ChannelFuture sendPing()