Class RoutingBuilder

java.lang.Object
net.uiqui.embedhttp.api.impl.RoutingBuilder
All Implemented Interfaces:
Router
Direct Known Subclasses:
RouterImpl

public abstract class RoutingBuilder extends Object implements Router
  • Constructor Details

    • RoutingBuilder

      public RoutingBuilder()
  • Method Details

    • get

      public RoutingBuilder get(String pathPattern, HttpRequestHandler handler)
      Description copied from interface: Router
      Registers a handler for GET method and path pattern.
      Specified by:
      get in interface Router
      Parameters:
      pathPattern - The path pattern to match against incoming requests.
      handler - The handler to be invoked when a request matches the specified method and path pattern.
      Returns:
      The current Router instance for method chaining.
    • post

      public RoutingBuilder post(String pathPattern, HttpRequestHandler handler)
      Description copied from interface: Router
      Registers a handler for POST method and path pattern.
      Specified by:
      post in interface Router
      Parameters:
      pathPattern - The path pattern to match against incoming requests.
      handler - The handler to be invoked when a request matches the specified method and path pattern.
      Returns:
      The current Router instance for method chaining.
    • put

      public RoutingBuilder put(String pathPattern, HttpRequestHandler handler)
      Description copied from interface: Router
      Registers a handler for PUT method and path pattern.
      Specified by:
      put in interface Router
      Parameters:
      pathPattern - The path pattern to match against incoming requests.
      handler - The handler to be invoked when a request matches the specified method and path pattern.
      Returns:
      The current Router instance for method chaining.
    • delete

      public RoutingBuilder delete(String pathPattern, HttpRequestHandler handler)
      Description copied from interface: Router
      Registers a handler for DELETE method and path pattern.
      Specified by:
      delete in interface Router
      Parameters:
      pathPattern - The path pattern to match against incoming requests.
      handler - The handler to be invoked when a request matches the specified method and path pattern.
      Returns:
      The current Router instance for method chaining.
    • head

      public RoutingBuilder head(String pathPattern, HttpRequestHandler handler)
      Description copied from interface: Router
      Registers a handler for HEAD method and path pattern.
      Specified by:
      head in interface Router
      Parameters:
      pathPattern - The path pattern to match against incoming requests.
      handler - The handler to be invoked when a request matches the specified method and path pattern.
      Returns:
      The current Router instance for method chaining.
    • options

      public RoutingBuilder options(String pathPattern, HttpRequestHandler handler)
      Description copied from interface: Router
      Registers a handler for OPTIONS method and path pattern.
      Specified by:
      options in interface Router
      Parameters:
      pathPattern - The path pattern to match against incoming requests.
      handler - The handler to be invoked when a request matches the specified method and path pattern.
      Returns:
      The current Router instance for method chaining.
    • patch

      public RoutingBuilder patch(String pathPattern, HttpRequestHandler handler)
      Description copied from interface: Router
      Registers a handler for PATCH method and path pattern.
      Specified by:
      patch in interface Router
      Parameters:
      pathPattern - The path pattern to match against incoming requests.
      handler - The handler to be invoked when a request matches the specified method and path pattern.
      Returns:
      The current Router instance for method chaining.
    • getRoutesForMethod

      public List<Route> getRoutesForMethod(HttpMethod method)