public class NettyEventSenderFactory<T> extends EventLoopGroupFactory implements EventSenderFactory<T>
| Modifier and Type | Field and Description |
|---|---|
private String |
address |
private Supplier<List<io.netty.channel.ChannelHandler>> |
handlerSupplier |
private Duration |
idleTimeout |
private static int |
MAX_PENDING_ACQUIRES |
private int |
maxConnections |
private int |
port |
private TransportProtocol |
protocol |
private Duration |
shutdownQuietPeriod |
private Duration |
shutdownTimeout |
private boolean |
singleEventPerConnection |
private Integer |
socketSendBufferSize |
private SSLContext |
sslContext |
private Duration |
timeout |
| Constructor and Description |
|---|
NettyEventSenderFactory(String address,
int port,
TransportProtocol protocol) |
| Modifier and Type | Method and Description |
|---|---|
private io.netty.channel.ChannelInitializer<io.netty.channel.Channel> |
getChannelInitializer() |
private io.netty.channel.pool.ChannelPool |
getChannelPool(io.netty.bootstrap.Bootstrap bootstrap) |
private EventSender<T> |
getConfiguredEventSender(io.netty.bootstrap.Bootstrap bootstrap) |
EventSender<T> |
getEventSender()
Get Event Sender
|
private void |
setChannelOptions(io.netty.bootstrap.Bootstrap bootstrap) |
void |
setHandlerSupplier(Supplier<List<io.netty.channel.ChannelHandler>> handlerSupplier)
Set Channel Handler Supplier
|
void |
setIdleTimeout(Duration idleTimeout)
Set the idle timeout period for outgoing client connections
|
void |
setMaxConnections(int maxConnections)
Set Maximum Connections for Channel Pool
|
void |
setShutdownQuietPeriod(Duration quietPeriod)
Set shutdown quiet period
|
void |
setShutdownTimeout(Duration timeout)
Set shutdown timeout
|
void |
setSingleEventPerConnection(boolean singleEventPerConnection)
Send a single event for the session and close the connection.
|
void |
setSocketSendBufferSize(Integer socketSendBufferSize)
Set Socket Send Buffer Size for TCP Sockets
|
void |
setSslContext(SSLContext sslContext)
Set SSL Context to enable TLS Channel Handler
|
void |
setTimeout(Duration timeout)
Set Timeout for Connections and Communication
|
getEventLoopGroup, setThreadNamePrefix, setWorkerThreadsprivate static final int MAX_PENDING_ACQUIRES
private Integer socketSendBufferSize
private final String address
private final int port
private final TransportProtocol protocol
private Duration timeout
private Duration idleTimeout
private int maxConnections
private SSLContext sslContext
private boolean singleEventPerConnection
private Duration shutdownQuietPeriod
private Duration shutdownTimeout
public NettyEventSenderFactory(String address, int port, TransportProtocol protocol)
public void setSocketSendBufferSize(Integer socketSendBufferSize)
socketSendBufferSize - Send Buffer size can be null to use default settingpublic void setHandlerSupplier(Supplier<List<io.netty.channel.ChannelHandler>> handlerSupplier)
handlerSupplier - Channel Handler Supplierpublic void setSslContext(SSLContext sslContext)
sslContext - SSL Contextpublic void setTimeout(Duration timeout)
timeout - Timeout Durationpublic void setIdleTimeout(Duration idleTimeout)
public void setShutdownQuietPeriod(Duration quietPeriod)
quietPeriod - shutdown quiet periodpublic void setShutdownTimeout(Duration timeout)
timeout - shutdown timeoutpublic void setMaxConnections(int maxConnections)
maxConnections - Maximum Number of connections defaults to available processors multiplied by 2public void setSingleEventPerConnection(boolean singleEventPerConnection)
singleEventPerConnection - true if the connection should be ended after an event is sentpublic EventSender<T> getEventSender()
EventSenderFactorygetEventSender in interface EventSenderFactory<T>private void setChannelOptions(io.netty.bootstrap.Bootstrap bootstrap)
private EventSender<T> getConfiguredEventSender(io.netty.bootstrap.Bootstrap bootstrap)
private io.netty.channel.pool.ChannelPool getChannelPool(io.netty.bootstrap.Bootstrap bootstrap)
private io.netty.channel.ChannelInitializer<io.netty.channel.Channel> getChannelInitializer()
Copyright © 2024 Apache NiFi Project. All rights reserved.