Interface HTTPServer.IRoutePrioritizer

All Known Implementing Classes:
HTTPServer.BaseRoutePrioritizer, HTTPServer.DefaultRoutePrioritizer, HTTPServer.InsertionOrderRoutePrioritizer, HTTPServer.ProvidedPriorityRoutePrioritizer
Enclosing class:
HTTPServer

public static interface HTTPServer.IRoutePrioritizer
Holds the registered routes and defines their processing order.
  • Method Details

    • addRoute

      void addRoute(String url, int priority, Class<?> handler, Object... initParameter)
      Adds a route.
      Parameters:
      url - the URI pattern
      priority - the route priority
      handler - the handler class, may be null
      initParameter - constructor parameters for the handler
    • removeRoute

      void removeRoute(String url)
      Removes the route with the given URI pattern.
      Parameters:
      url - the URI pattern
    • getPrioritizedRoutes

      Collection<HTTPServer.UriResource> getPrioritizedRoutes()
      Returns all routes in processing order.
      Returns:
      the routes
    • setNotImplemented

      void setNotImplemented(Class<?> notImplemented)
      Sets the handler used for routes without an implementation.
      Parameters:
      notImplemented - the handler class