Context - the type of the context object that this service handles.Result - the type of the result produced by this service.public interface Service<Context,Result>
| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.CompletableFuture<Result> |
handle(Context context)
Handles the given context and returns a
CompletableFuture that will be completed with the result. |
java.lang.String |
key()
Gets the unique key identifying this service.
|
java.util.concurrent.CompletableFuture<Result> handle(Context context)
CompletableFuture that will be completed with the result.context - the context to handle.CompletableFuture that will be completed with the result of handling the context.java.lang.String key()