Package dev.restate.sdk.http.vertx
Class HttpEndpointRequestHandler
java.lang.Object
dev.restate.sdk.http.vertx.HttpEndpointRequestHandler
- All Implemented Interfaces:
io.vertx.core.Handler<io.vertx.core.http.HttpServerRequest>
public class HttpEndpointRequestHandler
extends Object
implements io.vertx.core.Handler<io.vertx.core.http.HttpServerRequest>
Vert.x HttpServer handler adapter for
Endpoint. See fromEndpoint(Endpoint).-
Method Summary
Modifier and TypeMethodDescriptionstatic HttpEndpointRequestHandlerfromEndpoint(Endpoint endpoint) Create aHttpEndpointRequestHandlerstatic HttpEndpointRequestHandlerfromEndpoint(Endpoint endpoint, boolean disableBidirectionalStreaming) Create aHttpEndpointRequestHandlervoidhandle(io.vertx.core.http.HttpServerRequest request)
-
Method Details
-
handle
public void handle(io.vertx.core.http.HttpServerRequest request) - Specified by:
handlein interfaceio.vertx.core.Handler<io.vertx.core.http.HttpServerRequest>
-
fromEndpoint
Create aHttpEndpointRequestHandler- Parameters:
endpoint- the endpoint to wrap- Returns:
- the built handler
-
fromEndpoint
public static HttpEndpointRequestHandler fromEndpoint(Endpoint endpoint, boolean disableBidirectionalStreaming) Create aHttpEndpointRequestHandler- Parameters:
endpoint- the endpoint to wrapdisableBidirectionalStreaming- if true, disable bidirectional streaming with HTTP/2 requests. Restate initiates for each invocation a bidirectional streaming using HTTP/2 between restate-server and the SDK. In some network setups, for example when using a load balancers that buffer request/response, bidirectional streaming will not work correctly. Only in these scenarios, we suggest disabling bidirectional streaming.- Returns:
- the built handler
-