public abstract class LifeCycle<T extends LifeCycle> extends Object implements Stoppable
Modifier and Type | Field and Description |
---|---|
protected io.netty.channel.EventLoopGroup |
bossGroup |
protected List<Future<io.netty.channel.Channel>> |
channelOpenedFutures |
protected org.slf4j.Logger |
logger |
protected io.netty.bootstrap.ServerBootstrap |
serverBootstrap |
protected StopEventQueue |
stopEventQueue |
protected io.netty.channel.EventLoopGroup |
workerGroup |
Constructor and Description |
---|
LifeCycle() |
Modifier and Type | Method and Description |
---|---|
List<Integer> |
bindToPorts(List<Integer> requestedPortBindings) |
int |
getPort() |
List<Integer> |
getPorts() |
boolean |
isRunning() |
protected void |
started(Integer port) |
Future<?> |
stop() |
protected void |
stopped() |
T |
withStopEventQueue(StopEventQueue stopEventQueue) |
protected final org.slf4j.Logger logger
protected final io.netty.channel.EventLoopGroup bossGroup
protected final io.netty.channel.EventLoopGroup workerGroup
protected StopEventQueue stopEventQueue
protected io.netty.bootstrap.ServerBootstrap serverBootstrap
public T withStopEventQueue(StopEventQueue stopEventQueue)
public boolean isRunning()
public int getPort()
protected void started(Integer port)
protected void stopped()
Copyright © 2018. All rights reserved.