public class Route extends Object
Controller
and its methods.Constructor and Description |
---|
Route() |
Modifier and Type | Method and Description |
---|---|
protected String |
checkAuth(UserInfo user)
Determines if the current user is authorized to access this routing.
|
protected static Route |
compile(Controller controller,
Method method,
Routed routed)
Compiles a method defined by a
Controller |
Controller |
getController()
Returns the controller owning this route.
|
protected Method |
getMethod()
Returns the method which is to be invoked if the an URI can be successfully routed using this route
(all parameters match).
|
protected String |
getPattern()
Returns a string representation of the internal matching pattern, to detect routes which match the same URLs.
|
protected boolean |
isJSONCall()
Determines if the route will result in a JSON response.
|
protected boolean |
isPreDispatchable()
Determines if the route is pre dispatchable.
|
protected List<Object> |
matches(WebContext ctx,
String requestedURI,
boolean preDispatch)
Determines if this route matches the current request.
|
String |
toString() |
protected static Route compile(Controller controller, Method method, Routed routed)
Controller
protected List<Object> matches(WebContext ctx, String requestedURI, boolean preDispatch)
ctx
- defines the current requestrequestedURI
- contains the request uri as stringpreDispatch
- determines if we're doing a pre-dispatch (looking for a controller which handles
incomplete requests like file uploads)NO_MATCH
if the route does not match or a list of extracted object from the URI as defined by
the templateprotected String checkAuth(UserInfo user)
user
- the current userprotected Method getMethod()
public Controller getController()
protected boolean isPreDispatchable()
InputStreamHandler
which will be used to process the payload of the request.protected boolean isJSONCall()
isJSONCall()
of the annotation which created this routeprotected String getPattern()
Copyright © 2018. All rights reserved.