Class HTTPServer.DefaultRoutePrioritizer
java.lang.Object
ch.autumo.beetroot.server.HTTPServer.BaseRoutePrioritizer
ch.autumo.beetroot.server.HTTPServer.DefaultRoutePrioritizer
- All Implemented Interfaces:
HTTPServer.IRoutePrioritizer
- Enclosing class:
HTTPServer
Orders routes by the priority assigned when they were added.
-
Field Summary
Fields inherited from class HTTPServer.BaseRoutePrioritizer
mappings, notImplementedModifier and TypeFieldDescriptionprotected final Collection<HTTPServer.UriResource> Routes registered with this prioritizer.protected Class<?> Handler used for routes without an implementation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Collection<HTTPServer.UriResource> Creates the collection that holds the routes.Methods inherited from class HTTPServer.BaseRoutePrioritizer
addRoute, getPrioritizedRoutes, removeRoute, setNotImplementedModifier and TypeMethodDescriptionvoidAdds a route.Returns all routes in processing order.voidremoveRoute(String url) Removes the route with the given URI pattern.voidsetNotImplemented(Class<?> handler) Sets the handler used for routes without an implementation.
-
Constructor Details
-
DefaultRoutePrioritizer
public DefaultRoutePrioritizer()Default constructor.
-
-
Method Details
-
newMappingCollection
Description copied from class:HTTPServer.BaseRoutePrioritizerCreates the collection that holds the routes.- Specified by:
newMappingCollectionin classHTTPServer.BaseRoutePrioritizer- Returns:
- a new, empty route collection
-