T - Event Typeclass NettyEventSender<T> extends Object implements EventSender<T>
| Modifier and Type | Field and Description |
|---|---|
private io.netty.channel.pool.ChannelPool |
channelPool |
private io.netty.channel.EventLoopGroup |
group |
private SocketAddress |
remoteAddress |
private boolean |
singleEventPerConnection |
| Constructor and Description |
|---|
NettyEventSender(io.netty.channel.EventLoopGroup group,
io.netty.channel.pool.ChannelPool channelPool,
SocketAddress remoteAddress,
boolean singleEventPerConnection)
Netty Channel Event Sender with Event Loop Group and Channel Pool
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close Channel Pool and Event Loop Group
|
private String |
getChannelMessage(String message) |
private void |
releaseChannel(io.netty.channel.Channel channel) |
void |
sendEvent(T event)
Send Event using Channel acquired from Channel Pool
|
String |
toString()
String representation includes Channel Remote Address
|
private final io.netty.channel.EventLoopGroup group
private final io.netty.channel.pool.ChannelPool channelPool
private final SocketAddress remoteAddress
private boolean singleEventPerConnection
NettyEventSender(io.netty.channel.EventLoopGroup group,
io.netty.channel.pool.ChannelPool channelPool,
SocketAddress remoteAddress,
boolean singleEventPerConnection)
group - Event Loop GroupchannelPool - Channel PoolremoteAddress - Remote AddresssingleEventPerConnection - If true, send a single event per connection, and then close it.public void sendEvent(T event)
sendEvent in interface EventSender<T>event - Eventpublic void close()
close in interface AutoCloseablepublic String toString()
private void releaseChannel(io.netty.channel.Channel channel)
Copyright © 2021 Apache NiFi Project. All rights reserved.