The Injector from which to instantiate all the naptime resources.
The set of naptime macro resource router builders corresponding to the collection of resources to serve. These are typically bound via Guice multi-bindings.
The prefix path under which the resources should be served (in the example above:
/api
).
Includes the Naptime resources into Play's dev mode not-found handler that lists all routes.
Includes the Naptime resources into Play's dev mode not-found handler that lists all routes.
Route the request to one of the naptime resources, invoking the (macro-generated) router.
Route the request to one of the naptime resources, invoking the (macro-generated) router.
The request to route.
If this is a naptime request for one of the routers, return the handler, otherwise None
Defer to handlerFor instead of the other way around for performance reasons.
Defer to handlerFor instead of the other way around for performance reasons.
It is better to have the true implementation in handlerFor
where we can route a request once
than to implement the partial function here, and have handlerFor call isDefinedAt and then
apply, which would result in request routing and URL parsing occuring twice for a single
request when it wouldn't need to.
Handles routing for Naptime resources in an idiomatic fashion for Play projects.
To use this router, include in your routes file something like:
Requests matching the prefix for naptime resources will then be routed appropriately.
The Injector from which to instantiate all the naptime resources.
The set of naptime macro resource router builders corresponding to the collection of resources to serve. These are typically bound via Guice multi-bindings.
The prefix path under which the resources should be served (in the example above:
/api
).