Method handler and handler result
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
package dev.selimaj.session.types;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
|
||||
public record HandlerResult(boolean isError, JsonNode value) {
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package dev.selimaj.session.types;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
@FunctionalInterface
|
||||
public interface MethodHandler {
|
||||
CompletableFuture<HandlerResult> handle(int id, JsonNode data);
|
||||
}
|
||||
Reference in New Issue
Block a user