Package kos.core.events
Interface EventHandler<T>
-
- All Superinterfaces:
io.vertx.core.Handler<io.vertx.core.eventbus.Message<T>>
- All Known Implementing Classes:
AsyncEventHandler,SyncEventHandler
public interface EventHandler<T> extends io.vertx.core.Handler<io.vertx.core.eventbus.Message<T>>Handles received events asynchronously. It will always acknowledge to the publisher that the process has been finished, being it a successful attempt or not. Publishers will be able to receive the reply only when using Vert.x EventLoop Req/Reply pattern.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static <T> EventHandler<T>async(Function<io.vertx.core.eventbus.Message<T>,io.vertx.core.Future<Void>> handler)default voidhandle(io.vertx.core.eventbus.Message<T> event)static <T> EventHandler<T>sync(Consumer<io.vertx.core.eventbus.Message<T>> handler)io.vertx.core.Future<Void>tryHandle(io.vertx.core.eventbus.Message<T> event)
-
-
-
Method Detail
-
handle
default void handle(io.vertx.core.eventbus.Message<T> event)
- Specified by:
handlein interfaceio.vertx.core.Handler<T>
-
sync
static <T> EventHandler<T> sync(Consumer<io.vertx.core.eventbus.Message<T>> handler)
-
async
static <T> EventHandler<T> async(Function<io.vertx.core.eventbus.Message<T>,io.vertx.core.Future<Void>> handler)
-
-