Class SpringWebRouter

java.lang.Object
com.robothy.netty.router.AbstractRouter
com.robothy.netty.router.SpringWebRouter
All Implemented Interfaces:
Router

public class SpringWebRouter
extends AbstractRouter
  • Constructor Details

    • SpringWebRouter

      public SpringWebRouter()
  • Method Details

    • route

      public Router route​(Route rule)
      Description copied from interface: Router
      Register a handler for the request that matched rule.
      Parameters:
      rule - match conditions
      Returns:
      this
    • match

      public HttpRequestHandler match​(HttpRequest request)
      Description copied from interface: Router
      Find a handler for the given request according to registered routes. And set the extracted path parameters to HttpRequest.parameters(String).
      Parameters:
      request - HTTP request.
      Returns:
      a matched handler; or null if no matched handlers.