Class NettyEventServer

java.lang.Object
org.apache.nifi.event.transport.netty.NettyEventServer
All Implemented Interfaces:
EventServer

class NettyEventServer extends Object implements EventServer
Netty Event Server
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final io.netty.channel.Channel
     
    private final io.netty.channel.EventLoopGroup
     
    private final Duration
     
    private final Duration
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    NettyEventServer(io.netty.channel.EventLoopGroup group, io.netty.channel.Channel channel)
    Netty Event Server with Event Loop Group and bound Channel
    NettyEventServer(io.netty.channel.EventLoopGroup group, io.netty.channel.Channel channel, Duration quietPeriod, Duration timeout)
    Netty Event Server with Event Loop Group, bound Channel, and Shutdown Configuration
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the port that the server is listening on, if available.
    void
    Close Channel and shutdown Event Loop Group

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • group

      private final io.netty.channel.EventLoopGroup group
    • channel

      private final io.netty.channel.Channel channel
    • shutdownQuietPeriod

      private final Duration shutdownQuietPeriod
    • shutdownTimeout

      private final Duration shutdownTimeout
  • Constructor Details

    • NettyEventServer

      NettyEventServer(io.netty.channel.EventLoopGroup group, io.netty.channel.Channel channel)
      Netty Event Server with Event Loop Group and bound Channel
      Parameters:
      group - Event Loop Group
      channel - Bound Channel
    • NettyEventServer

      NettyEventServer(io.netty.channel.EventLoopGroup group, io.netty.channel.Channel channel, Duration quietPeriod, Duration timeout)
      Netty Event Server with Event Loop Group, bound Channel, and Shutdown Configuration
      Parameters:
      group - Event Loop Group
      channel - Bound Channel
      quietPeriod - server shutdown quiet period
      timeout - server shutdown timeout
  • Method Details

    • shutdown

      public void shutdown()
      Close Channel and shutdown Event Loop Group
      Specified by:
      shutdown in interface EventServer
    • getListeningPort

      public int getListeningPort()
      Description copied from interface: EventServer
      Returns the port that the server is listening on, if available. If unable to determine the port, will return 0.
      Specified by:
      getListeningPort in interface EventServer
      Returns:
      the port that the server is listening on, or 0 if unable to determine the port