use of com.github.dreamhead.moco.bootstrap.ShutdownArgs in project moco by dreamhead.
the class ShutdownTask method run.
@Override
public void run(final String[] args) {
ShutdownArgs shutdownArgs = parse(args);
client.run("127.0.0.1", shutdownArgs.getShutdownPort().get(), new ChannelInitializer<SocketChannel>() {
@Override
protected void initChannel(final SocketChannel ch) throws Exception {
ChannelPipeline pipeline = ch.pipeline();
pipeline.addLast("encoder", new StringEncoder());
pipeline.addLast("handler", new ShutdownHandler());
}
});
}
Aggregations