Class NettyEventServerFactory

java.lang.Object
org.apache.nifi.event.transport.netty.EventLoopGroupFactory
org.apache.nifi.event.transport.netty.NettyEventServerFactory
All Implemented Interfaces:
EventServerFactory
Direct Known Subclasses:
ByteArrayMessageNettyEventServerFactory

public class NettyEventServerFactory extends EventLoopGroupFactory implements EventServerFactory
Netty Event Server Factory
  • Field Details

    • address

      private final InetAddress address
    • port

      private final int port
    • protocol

      private final TransportProtocol protocol
    • handlerSupplier

      private Supplier<List<io.netty.channel.ChannelHandler>> handlerSupplier
    • socketReceiveBuffer

      private Integer socketReceiveBuffer
    • socketKeepAlive

      private Boolean socketKeepAlive
    • sslContext

      private SSLContext sslContext
    • sslParameters

      private SSLParameters sslParameters
    • clientAuth

      private ClientAuth clientAuth
    • shutdownQuietPeriod

      private Duration shutdownQuietPeriod
    • shutdownTimeout

      private Duration shutdownTimeout
    • idleTimeout

      private Duration idleTimeout
    • bufferAllocator

      private BufferAllocator bufferAllocator
  • Constructor Details

  • Method Details

    • setHandlerSupplier

      public void setHandlerSupplier(Supplier<List<io.netty.channel.ChannelHandler>> handlerSupplier)
      Set Channel Handler Supplier
      Parameters:
      handlerSupplier - Channel Handler Supplier
    • setSocketKeepAlive

      public void setSocketKeepAlive(Boolean socketKeepAlive)
      Set Socket Keep Alive for TCP Sockets
      Parameters:
      socketKeepAlive - Keep Alive can be null to use default setting
    • setSocketReceiveBuffer

      public void setSocketReceiveBuffer(Integer socketReceiveBuffer)
      Set Socket Receive Buffer Size for TCP Sockets
      Parameters:
      socketReceiveBuffer - Receive Buffer size can be null to use default setting
    • setSslContext

      public void setSslContext(SSLContext sslContext)
      Set SSL Context to enable TLS Channel Handler
      Parameters:
      sslContext - SSL Context
    • setSslParameters

      public void setSslParameters(SSLParameters sslParameters)
      Set SSL Parameters for optional additional configuration of TLS negotiation
      Parameters:
      sslParameters - SSL Parameters
    • setClientAuth

      public void setClientAuth(ClientAuth clientAuth)
      Set Client Authentication
      Parameters:
      clientAuth - Client Authentication
    • setShutdownQuietPeriod

      public void setShutdownQuietPeriod(Duration quietPeriod)
      Set shutdown quiet period
      Parameters:
      quietPeriod - shutdown quiet period
    • setShutdownTimeout

      public void setShutdownTimeout(Duration timeout)
      Set shutdown timeout
      Parameters:
      timeout - shutdown timeout
    • setBufferAllocator

      public void setBufferAllocator(BufferAllocator bufferAllocator)
      Set Buffer Allocator option overriding the default POOLED configuration
      Parameters:
      bufferAllocator - Buffer Allocator
    • setIdleTimeout

      public void setIdleTimeout(Duration timeout)
      Set an idle timeout for connections, which closes a connection when there have been no read or writes for the given timeout period. Has no default - idle connections will not be closed by the server unless this timeout is set to non-zero.
    • getEventServer

      public EventServer getEventServer()
      Get Event Server with Channel bound to configured address and port number
      Specified by:
      getEventServer in interface EventServerFactory
      Returns:
      Event Sender
    • setChannelOptions

      private void setChannelOptions(io.netty.bootstrap.AbstractBootstrap<?,?> bootstrap)
    • getBootstrap

      private io.netty.bootstrap.AbstractBootstrap<?,?> getBootstrap()
    • getChannelInitializer

      private io.netty.channel.ChannelInitializer<?> getChannelInitializer()
    • getBoundEventServer

      private EventServer getBoundEventServer(io.netty.bootstrap.AbstractBootstrap<?,?> bootstrap, io.netty.channel.EventLoopGroup group)