use of io.atomix.messaging.MessagingException.NoRemoteHandler in project atomix by atomix.
the class TestMessagingService method getHandler.
/**
* Returns the given handler for the given endpoint.
*/
private BiFunction<Endpoint, byte[], CompletableFuture<byte[]>> getHandler(Endpoint endpoint, String type) {
TestMessagingService service = getService(endpoint);
if (service == null) {
return (e, p) -> Futures.exceptionalFuture(new NoRemoteHandler());
}
BiFunction<Endpoint, byte[], CompletableFuture<byte[]>> handler = service.handlers.get(checkNotNull(type));
if (handler == null) {
return (e, p) -> Futures.exceptionalFuture(new NoRemoteHandler());
}
return handler;
}
use of io.atomix.messaging.MessagingException.NoRemoteHandler in project atomix by atomix.
the class TestMessagingService method getHandler.
/**
* Returns the given handler for the given endpoint.
*/
private BiFunction<Endpoint, byte[], CompletableFuture<byte[]>> getHandler(Endpoint endpoint, String type) {
TestMessagingService service = getService(endpoint);
if (service == null) {
return (e, p) -> Futures.exceptionalFuture(new NoRemoteHandler());
}
BiFunction<Endpoint, byte[], CompletableFuture<byte[]>> handler = service.handlers.get(checkNotNull(type));
if (handler == null) {
return (e, p) -> Futures.exceptionalFuture(new NoRemoteHandler());
}
return handler;
}
Aggregations