RestateHttpEndpointBuilder

Endpoint builder for a Restate HTTP Endpoint using Vert.x, to serve Restate services.

This endpoint supports the Restate HTTP/2 Streaming component Protocol.

Example usage:

public static void main(String[] args) {
  RestateHttpEndpointBuilder.builder()
          .bind(new Counter())
          .buildAndListen();
}

Functions

Link copied to clipboard
open fun bind(serviceDefinition: ServiceDefinition<out Any>): RestateHttpEndpointBuilder
open fun bind(service: Any): RestateHttpEndpointBuilder
Add a Restate service to the endpoint.
open fun <O> bind(serviceDefinition: ServiceDefinition<O>, options: O): RestateHttpEndpointBuilder
Add a Restate service to the endpoint, setting the options.
Link copied to clipboard
open fun build(): HttpServer
Build the HttpServer serving the Restate service endpoint.
Link copied to clipboard
open fun buildAndListen(): Int
Build and listen on the port specified by the environment variable PORT, or alternatively on the default 9080 port.
open fun buildAndListen(port: Int): Int
Build and listen on the specified port.
Link copied to clipboard
open fun builder(vertx: Vertx): RestateHttpEndpointBuilder
Create a new builder.
Link copied to clipboard
open fun withOpenTelemetry(openTelemetry: OpenTelemetry): RestateHttpEndpointBuilder
Set the OpenTelemetry implementation for tracing and metrics.
Link copied to clipboard
open fun withOptions(options: HttpServerOptions): RestateHttpEndpointBuilder
Add custom HttpServerOptions to the server used by the endpoint.
Link copied to clipboard
Set the request identity verifier for this endpoint.