use of com.codingchili.core.listener.transport.ClusterListener in project chili-core by codingchili.
the class SystemContext method handler.
@Override
public Future<String> handler(Supplier<CoreHandler> handler) {
ListenerSettings settings = new ListenerSettings();
Promise<String> promise = Promise.promise();
deployN(() -> new ClusterListener().settings(settings).handler(handler.get()), promise);
return promise.future();
}
use of com.codingchili.core.listener.transport.ClusterListener in project chili-core by codingchili.
the class ClusterListenerTest method setUp.
@Before
public void setUp(TestContext test) {
Async async = test.async();
this.context = new ContextMock();
this.handler = new TestHandler(context, REPLY_ADDRESS);
this.cluster = new ClusterListener().handler(handler).settings(new ListenerSettings());
context.listener(() -> cluster).onComplete(done -> {
if (done.failed()) {
done.cause().printStackTrace();
}
test.assertTrue(done.succeeded());
this.deployment = done.result();
async.complete();
});
}
Aggregations