Class NettyEventServer
java.lang.Object
org.apache.nifi.event.transport.netty.NettyEventServer
- All Implemented Interfaces:
EventServer
Netty Event Server
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNettyEventServer(io.netty.channel.EventLoopGroup group, io.netty.channel.Channel channel) Netty Event Server with Event Loop Group and bound ChannelNettyEventServer(io.netty.channel.EventLoopGroup group, io.netty.channel.Channel channel, Duration quietPeriod, Duration timeout) Netty Event Server with Event Loop Group, bound Channel, and Shutdown Configuration -
Method Summary
Modifier and TypeMethodDescriptionintReturns the port that the server is listening on, if available.voidshutdown()Close Channel and shutdown Event Loop Group
-
Field Details
-
group
private final io.netty.channel.EventLoopGroup group -
channel
private final io.netty.channel.Channel channel -
shutdownQuietPeriod
-
shutdownTimeout
-
-
Constructor Details
-
NettyEventServer
NettyEventServer(io.netty.channel.EventLoopGroup group, io.netty.channel.Channel channel) Netty Event Server with Event Loop Group and bound Channel- Parameters:
group- Event Loop Groupchannel- Bound Channel
-
NettyEventServer
NettyEventServer(io.netty.channel.EventLoopGroup group, io.netty.channel.Channel channel, Duration quietPeriod, Duration timeout) Netty Event Server with Event Loop Group, bound Channel, and Shutdown Configuration- Parameters:
group- Event Loop Groupchannel- Bound ChannelquietPeriod- server shutdown quiet periodtimeout- server shutdown timeout
-
-
Method Details
-
shutdown
public void shutdown()Close Channel and shutdown Event Loop Group- Specified by:
shutdownin interfaceEventServer
-
getListeningPort
public int getListeningPort()Description copied from interface:EventServerReturns the port that the server is listening on, if available. If unable to determine the port, will return 0.- Specified by:
getListeningPortin interfaceEventServer- Returns:
- the port that the server is listening on, or 0 if unable to determine the port
-