public class NettyEventServerFactory extends EventLoopGroupFactory implements EventServerFactory
| Modifier and Type | Field and Description |
|---|---|
private InetAddress |
address |
private BufferAllocator |
bufferAllocator |
private ClientAuth |
clientAuth |
private Supplier<List<io.netty.channel.ChannelHandler>> |
handlerSupplier |
private Duration |
idleTimeout |
private int |
port |
private TransportProtocol |
protocol |
private Duration |
shutdownQuietPeriod |
private Duration |
shutdownTimeout |
private Boolean |
socketKeepAlive |
private Integer |
socketReceiveBuffer |
private SSLContext |
sslContext |
private SSLParameters |
sslParameters |
| Constructor and Description |
|---|
NettyEventServerFactory(InetAddress address,
int port,
TransportProtocol protocol) |
| Modifier and Type | Method and Description |
|---|---|
private io.netty.bootstrap.AbstractBootstrap<?,?> |
getBootstrap() |
private EventServer |
getBoundEventServer(io.netty.bootstrap.AbstractBootstrap<?,?> bootstrap,
io.netty.channel.EventLoopGroup group) |
private io.netty.channel.ChannelInitializer<?> |
getChannelInitializer() |
EventServer |
getEventServer()
Get Event Server with Channel bound to configured address and port number
|
void |
setBufferAllocator(BufferAllocator bufferAllocator)
Set Buffer Allocator option overriding the default POOLED configuration
|
private void |
setChannelOptions(io.netty.bootstrap.AbstractBootstrap<?,?> bootstrap) |
void |
setClientAuth(ClientAuth clientAuth)
Set Client Authentication
|
void |
setHandlerSupplier(Supplier<List<io.netty.channel.ChannelHandler>> handlerSupplier)
Set Channel Handler Supplier
|
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.
|
void |
setShutdownQuietPeriod(Duration quietPeriod)
Set shutdown quiet period
|
void |
setShutdownTimeout(Duration timeout)
Set shutdown timeout
|
void |
setSocketKeepAlive(Boolean socketKeepAlive)
Set Socket Keep Alive for TCP Sockets
|
void |
setSocketReceiveBuffer(Integer socketReceiveBuffer)
Set Socket Receive Buffer Size for TCP Sockets
|
void |
setSslContext(SSLContext sslContext)
Set SSL Context to enable TLS Channel Handler
|
void |
setSslParameters(SSLParameters sslParameters)
Set SSL Parameters for optional additional configuration of TLS negotiation
|
getEventLoopGroup, setThreadNamePrefix, setWorkerThreadsprivate final InetAddress address
private final int port
private final TransportProtocol protocol
private Integer socketReceiveBuffer
private Boolean socketKeepAlive
private SSLContext sslContext
private SSLParameters sslParameters
private ClientAuth clientAuth
private Duration shutdownQuietPeriod
private Duration shutdownTimeout
private Duration idleTimeout
private BufferAllocator bufferAllocator
public NettyEventServerFactory(InetAddress address, int port, TransportProtocol protocol)
public void setHandlerSupplier(Supplier<List<io.netty.channel.ChannelHandler>> handlerSupplier)
handlerSupplier - Channel Handler Supplierpublic void setSocketKeepAlive(Boolean socketKeepAlive)
socketKeepAlive - Keep Alive can be null to use default settingpublic void setSocketReceiveBuffer(Integer socketReceiveBuffer)
socketReceiveBuffer - Receive Buffer size can be null to use default settingpublic void setSslContext(SSLContext sslContext)
sslContext - SSL Contextpublic void setSslParameters(SSLParameters sslParameters)
sslParameters - SSL Parameterspublic void setClientAuth(ClientAuth clientAuth)
clientAuth - Client Authenticationpublic void setShutdownQuietPeriod(Duration quietPeriod)
quietPeriod - shutdown quiet periodpublic void setShutdownTimeout(Duration timeout)
timeout - shutdown timeoutpublic void setBufferAllocator(BufferAllocator bufferAllocator)
bufferAllocator - Buffer Allocatorpublic void setIdleTimeout(Duration timeout)
public EventServer getEventServer()
getEventServer in interface EventServerFactoryprivate void setChannelOptions(io.netty.bootstrap.AbstractBootstrap<?,?> bootstrap)
private io.netty.bootstrap.AbstractBootstrap<?,?> getBootstrap()
private io.netty.channel.ChannelInitializer<?> getChannelInitializer()
private EventServer getBoundEventServer(io.netty.bootstrap.AbstractBootstrap<?,?> bootstrap, io.netty.channel.EventLoopGroup group)
Copyright © 2024 Apache NiFi Project. All rights reserved.