Interface HttpService

All Superinterfaces:
ServerLifecycle, Supplier<HttpService>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface HttpService extends Supplier<HttpService>, ServerLifecycle
Encapsulates a set of routing rules and related logic.

Instance can be assigned to the routing using HttpRouting.Builder.register(java.util.function.Supplier[]) methods.

  • Method Details

    • get

      default HttpService get()
      Specified by:
      get in interface Supplier<HttpService>
    • routing

      void routing(HttpRules rules)
      Updates the routing to add handlers of this service.
      Parameters:
      rules - to update