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
Netty Event Server Factory
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final InetAddressprivate BufferAllocatorprivate ClientAuthprivate Durationprivate final intprivate final TransportProtocolprivate Durationprivate Durationprivate Booleanprivate Integerprivate SSLContextprivate SSLParameters -
Constructor Summary
ConstructorsConstructorDescriptionNettyEventServerFactory(InetAddress address, int port, TransportProtocol protocol) -
Method Summary
Modifier and TypeMethodDescriptionprivate io.netty.bootstrap.AbstractBootstrap<?, ?> private EventServergetBoundEventServer(io.netty.bootstrap.AbstractBootstrap<?, ?> bootstrap, io.netty.channel.EventLoopGroup group) private io.netty.channel.ChannelInitializer<?> Get Event Server with Channel bound to configured address and port numbervoidsetBufferAllocator(BufferAllocator bufferAllocator) Set Buffer Allocator option overriding the default POOLED configurationprivate voidsetChannelOptions(io.netty.bootstrap.AbstractBootstrap<?, ?> bootstrap) voidsetClientAuth(ClientAuth clientAuth) Set Client AuthenticationvoidsetHandlerSupplier(Supplier<List<io.netty.channel.ChannelHandler>> handlerSupplier) Set Channel Handler SuppliervoidsetIdleTimeout(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.voidsetShutdownQuietPeriod(Duration quietPeriod) Set shutdown quiet periodvoidsetShutdownTimeout(Duration timeout) Set shutdown timeoutvoidsetSocketKeepAlive(Boolean socketKeepAlive) Set Socket Keep Alive for TCP SocketsvoidsetSocketReceiveBuffer(Integer socketReceiveBuffer) Set Socket Receive Buffer Size for TCP SocketsvoidsetSslContext(SSLContext sslContext) Set SSL Context to enable TLS Channel HandlervoidsetSslParameters(SSLParameters sslParameters) Set SSL Parameters for optional additional configuration of TLS negotiationMethods inherited from class org.apache.nifi.event.transport.netty.EventLoopGroupFactory
getEventLoopGroup, setThreadNamePrefix, setWorkerThreads
-
Field Details
-
address
-
port
private final int port -
protocol
-
handlerSupplier
-
socketReceiveBuffer
-
socketKeepAlive
-
sslContext
-
sslParameters
-
clientAuth
-
shutdownQuietPeriod
-
shutdownTimeout
-
idleTimeout
-
bufferAllocator
-
-
Constructor Details
-
NettyEventServerFactory
-
-
Method Details
-
setHandlerSupplier
Set Channel Handler Supplier- Parameters:
handlerSupplier- Channel Handler Supplier
-
setSocketKeepAlive
Set Socket Keep Alive for TCP Sockets- Parameters:
socketKeepAlive- Keep Alive can be null to use default setting
-
setSocketReceiveBuffer
Set Socket Receive Buffer Size for TCP Sockets- Parameters:
socketReceiveBuffer- Receive Buffer size can be null to use default setting
-
setSslContext
Set SSL Context to enable TLS Channel Handler- Parameters:
sslContext- SSL Context
-
setSslParameters
Set SSL Parameters for optional additional configuration of TLS negotiation- Parameters:
sslParameters- SSL Parameters
-
setClientAuth
Set Client Authentication- Parameters:
clientAuth- Client Authentication
-
setShutdownQuietPeriod
Set shutdown quiet period- Parameters:
quietPeriod- shutdown quiet period
-
setShutdownTimeout
Set shutdown timeout- Parameters:
timeout- shutdown timeout
-
setBufferAllocator
Set Buffer Allocator option overriding the default POOLED configuration- Parameters:
bufferAllocator- Buffer Allocator
-
setIdleTimeout
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
Get Event Server with Channel bound to configured address and port number- Specified by:
getEventServerin interfaceEventServerFactory- 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)
-