Class HttpRoute.Builder

java.lang.Object
io.helidon.webserver.http.HttpRoute.Builder
All Implemented Interfaces:
Builder<HttpRoute.Builder,HttpRoute>, Supplier<HttpRoute>
Enclosing interface:
HttpRoute

public static class HttpRoute.Builder extends Object implements Builder<HttpRoute.Builder,HttpRoute>
Fluent API builder for HttpRoute.
  • Method Details

    • build

      public HttpRoute build()
      Description copied from interface: Builder
      Build the instance from this builder.
      Specified by:
      build in interface Builder<HttpRoute.Builder,HttpRoute>
      Returns:
      instance of the built type
    • methods

      public HttpRoute.Builder methods(Method... methods)
      HTTP methods this route should handle.
      Parameters:
      methods - methods to handle
      Returns:
      updated builder
    • methods

      public HttpRoute.Builder methods(Predicate<Method> methodPredicate)
      Method predicate to use.
      Parameters:
      methodPredicate - method predicate
      Returns:
      updated builder
    • path

      public HttpRoute.Builder path(String pathPattern)
      Path pattern to handle.
      Parameters:
      pathPattern - path pattern
      Returns:
      updated builder
    • path

      public HttpRoute.Builder path(PathMatcher pathMatcher)
      Path matcher to handle path.
      Parameters:
      pathMatcher - path matcher
      Returns:
      updated builder
    • handler

      public HttpRoute.Builder handler(Handler handler)
      Handler to use.
      Parameters:
      handler - handler
      Returns:
      updated builder