use of com.codingchili.core.listener.transport.UdpListener in project chili-core by codingchili.
the class Service method start.
@Override
public void start(Future<Void> start) {
List<Future> deployments = new ArrayList<>();
for (ListenerSettings listener : context.transports()) {
handler = new RouterHandler(context);
Future<String> future = Future.future();
deployments.add(future);
switch(listener.getType()) {
case UDP:
start(UdpListener::new, listener.getType(), future);
break;
case TCP:
start(TcpListener::new, listener.getType(), future);
break;
case WEBSOCKET:
start(WebsocketListener::new, listener.getType(), future);
break;
case REST:
start(RestListener::new, listener.getType(), future);
break;
}
}
Logger logger = context.logger(getClass());
all(deployments).setHandler(done -> {
// logger.onServiceStarted(this);
start.complete();
});
}
Aggregations