public class CapturingRouter extends ResolvingRouter
MODE_BEST_MATCH, MODE_CUSTOM, MODE_FIRST_MATCH, MODE_LAST_MATCH, MODE_NEXT_MATCH, MODE_RANDOM_MATCH
Constructor and Description |
---|
CapturingRouter(Context context)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
TemplateRoute |
capture(String uriTemplate,
String internalUriTemplate,
boolean captureQuery)
Captures (internally redirects) a URI to a new URI within this router's
application.
|
TemplateRoute |
captureOther(String uriTemplate,
String application,
String internalUriTemplate,
boolean captureQuery)
Internally redirects a URI to a new URI within any application installed
in this router's component.
|
protected TemplateRoute |
createRoute(String uriPattern,
Restlet target,
int matchingMode) |
toString
attach, attach, attach, attach, attach, attach, attachDefault, attachDefault, createRoute, detach, detach, doHandle, getCustom, getDefaultMatchingMode, getDefaultMatchingQuery, getDefaultRoute, getMatchingMode, getMaxAttempts, getNext, getRequiredScore, getRetryDelay, getRoutes, getRoutingMode, handle, logRoute, redirectPermanent, redirectSeeOther, redirectTemporary, setDefaultMatchingMode, setDefaultMatchingQuery, setDefaultRoute, setMaxAttempts, setRequiredScore, setRetryDelay, setRoutes, setRoutingMode, start, stop
createFinder, finalize, getApplication, getAuthor, getContext, getDescription, getFinderClass, getLogger, getName, getOwner, handle, handle, handle, isStarted, isStopped, setAuthor, setContext, setDescription, setFinderClass, setName, setOwner
public CapturingRouter(Context context)
context
- The contextpublic TemplateRoute capture(String uriTemplate, String internalUriTemplate, boolean captureQuery)
Enforces matching mode Template.MODE_EQUALS
.
This is handled via a CapturingRedirector
in
Redirector.MODE_SERVER_OUTBOUND
mode.
uriTemplate
- The URI path template that must match the relative part of the
resource URIinternalUriTemplate
- The internal URI path to which we will redirectcaptureQuery
- Whether to capture the query, tooCapturingRedirector
public TemplateRoute captureOther(String uriTemplate, String application, String internalUriTemplate, boolean captureQuery)
Enforces matching mode Template.MODE_EQUALS
.
This is handled via a CapturingRedirector
in
Redirector.MODE_SERVER_OUTBOUND
mode.
uriTemplate
- The URI path template that must match the relative part of the
resource URIapplication
- The internal application nameinternalUriTemplate
- The internal URI path to which we will redirectcaptureQuery
- Whether to capture the query, tooprotected TemplateRoute createRoute(String uriPattern, Restlet target, int matchingMode)
createRoute
in class ResolvingRouter
Copyright © 2009-2016 Three Crickets LLC.