Interface HttpRouting

All Superinterfaces:
Prototype.Api, Routing, ServerLifecycle

public interface HttpRouting extends Routing, Prototype.Api
HTTP routing. This routing is capable of handling any HTTP version.
  • Method Details

    • builder

      static HttpRouting.Builder builder()
      Creates new instance of router builder.
      Returns:
      a new instance
    • create

      static HttpRouting create()
      Create a default router.
      Returns:
      new default router
    • empty

      static HttpRouting empty()
      Empty routing (all requests will return Status.NOT_FOUND_404.
      Returns:
      empty routing
    • routingType

      default Class<? extends Routing> routingType()
      Description copied from interface: Routing
      The class used by a Router to identify this Routing type and associate a connection with it.
      Specified by:
      routingType in interface Routing
      Returns:
      this routing type
    • route

      void route(ConnectionContext ctx, RoutingRequest request, RoutingResponse response)
      Route a request.
      Parameters:
      ctx - the underlying connection context
      request - the request to route
      response - the response for the request
    • security

      HttpSecurity security()
      Security associated with this routing.
      Returns:
      security