bind

open fun bind(service: Any): Endpoint.Builder

Add a Restate service to the endpoint. This will automatically discover the generated factory based on the class name.

You can also manually instantiate the ServiceDefinition using bind.


open fun bind(service: Any, options: HandlerRunner.Options): Endpoint.Builder

Like bind, but allows to provide options for the handler runner. This allows to configure for the Java API the executor where to run the handler code, or the Kotlin API the coroutine context.

Look at the respective documentations of the HandlerRunner class in the Java or in the Kotlin module.

See also


open fun bind(serviceDefinition: ServiceDefinition): Endpoint.Builder

Add a manual ServiceDefinition to the endpoint.