Class HTTPServer.ProvidedPriorityRoutePrioritizer
java.lang.Object
ch.autumo.beetroot.server.HTTPServer.BaseRoutePrioritizer
ch.autumo.beetroot.server.HTTPServer.ProvidedPriorityRoutePrioritizer
- All Implemented Interfaces:
HTTPServer.IRoutePrioritizer
- Enclosing class:
HTTPServer
public static class HTTPServer.ProvidedPriorityRoutePrioritizer
extends HTTPServer.BaseRoutePrioritizer
Uses the priority that was passed to
addRoute unchanged.-
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 TypeMethodDescriptionvoidAdds a route.protected Collection<HTTPServer.UriResource> Creates the collection that holds the routes.Methods inherited from class HTTPServer.BaseRoutePrioritizer
getPrioritizedRoutes, removeRoute, setNotImplementedModifier and TypeMethodDescriptionReturns 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
-
ProvidedPriorityRoutePrioritizer
public ProvidedPriorityRoutePrioritizer()Default constructor.
-
-
Method Details
-
addRoute
Description copied from class:HTTPServer.BaseRoutePrioritizerAdds a route. If no handler is given, the not-implemented handler is used.- Specified by:
addRoutein interfaceHTTPServer.IRoutePrioritizer- Overrides:
addRoutein classHTTPServer.BaseRoutePrioritizer- Parameters:
url- the URI patternpriority- the route priorityhandler- the handler class, may benullinitParameter- constructor parameters for the handler
-
newMappingCollection
Description copied from class:HTTPServer.BaseRoutePrioritizerCreates the collection that holds the routes.- Specified by:
newMappingCollectionin classHTTPServer.BaseRoutePrioritizer- Returns:
- a new, empty route collection
-