Class PushMessageSender

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.FullHttpRequest>
com.netflix.zuul.netty.server.push.PushMessageSender
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

@Sharable public abstract class PushMessageSender extends io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.FullHttpRequest>
Serves "/push" URL that is used by the backend to POST push messages to a given Zuul instance. This URL handler MUST BE accessible ONLY from RFC 1918 private internal network space (10.0.0.0 or 172.16.0.0) to guarantee that external applications/agents cannot push messages to your client. In AWS this can typically be achieved using correctly configured security groups. Author: Susheel Aroskar Date: 5/14/18
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

    io.netty.channel.ChannelHandler.Sharable
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    PushMessageSender(PushConnectionRegistry pushConnectionRegistry)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    channelRead0(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.FullHttpRequest request)
     
    protected abstract PushUserAuth
    getPushUserAuth(io.netty.handler.codec.http.FullHttpRequest request)
     
    protected void
     
    protected void
     
    protected void
     
    protected void
     
    protected void
    logPushEvent(io.netty.handler.codec.http.FullHttpRequest request, io.netty.handler.codec.http.HttpResponseStatus status, PushUserAuth userAuth)
     
    protected void
     
    protected void
     
    protected void
     
    protected boolean
    verifySecureToken(io.netty.handler.codec.http.FullHttpRequest request, PushConnection conn)
     

    Methods inherited from class io.netty.channel.SimpleChannelInboundHandler

    acceptInboundMessage, channelRead

    Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

    channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered

    Methods inherited from class io.netty.channel.ChannelHandlerAdapter

    ensureNotSharable, handlerAdded, handlerRemoved, isSharable

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.netty.channel.ChannelHandler

    handlerAdded, handlerRemoved
  • Field Details

  • Constructor Details

  • Method Details

    • verifySecureToken

      protected boolean verifySecureToken(io.netty.handler.codec.http.FullHttpRequest request, PushConnection conn)
    • channelRead0

      protected void channelRead0(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.FullHttpRequest request) throws Exception
      Specified by:
      channelRead0 in class io.netty.channel.SimpleChannelInboundHandler<io.netty.handler.codec.http.FullHttpRequest>
      Throws:
      Exception
    • logPushAttempt

      protected void logPushAttempt()
    • logNoIdentity

      protected void logNoIdentity()
    • logClientNotConnected

      protected void logClientNotConnected()
    • logPushSuccess

      protected void logPushSuccess()
    • logPushError

      protected void logPushError(Throwable t)
    • logRateLimited

      protected void logRateLimited()
    • logSecurityTokenVerificationFail

      protected void logSecurityTokenVerificationFail()
    • logPushEvent

      protected void logPushEvent(io.netty.handler.codec.http.FullHttpRequest request, io.netty.handler.codec.http.HttpResponseStatus status, PushUserAuth userAuth)
    • getPushUserAuth

      protected abstract PushUserAuth getPushUserAuth(io.netty.handler.codec.http.FullHttpRequest request)