|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.restlet.Restlet
org.restlet.routing.Router
org.restlet.engine.component.InternalRouter
public class InternalRouter
Provides the behavior of the internal router of a Component. It overrides the default behavior of a classic Router.
| Field Summary |
|---|
| Fields inherited from class org.restlet.routing.Router |
|---|
MODE_BEST_MATCH, MODE_CUSTOM, MODE_FIRST_MATCH, MODE_LAST_MATCH, MODE_NEXT_MATCH, MODE_RANDOM_MATCH |
| Constructor Summary | |
|---|---|
InternalRouter(Context context)
Constructor. |
|
| Method Summary | |
|---|---|
TemplateRoute |
attach(Restlet target)
Attaches a target Restlet to this router with an empty URI pattern. |
TemplateRoute |
attach(String uriPattern,
Restlet target)
Attaches a target Restlet to this router based on a given URI pattern. |
TemplateRoute |
attachDefault(Restlet defaultTarget)
Attaches a Restlet to this router as the default target to invoke when no route matches. |
Finder |
createFinder(Class<? extends ServerResource> targetClass)
|
protected TemplateRoute |
createRoute(String uriPattern,
Restlet target,
int matchingMode)
Creates a new route for the given URI pattern, target and matching mode. |
| Methods inherited from class org.restlet.routing.Router |
|---|
attach, attach, attach, attach, 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 |
| Methods inherited from class org.restlet.Restlet |
|---|
finalize, getApplication, getAuthor, getContext, getDescription, getFinderClass, getLogger, getName, getOwner, handle, handle, handle, isStarted, isStopped, setAuthor, setContext, setDescription, setFinderClass, setName, setOwner |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InternalRouter(Context context)
context - | Method Detail |
|---|
protected TemplateRoute createRoute(String uriPattern,
Restlet target,
int matchingMode)
RouterRouter.getDefaultMatchingQuery().
createRoute in class RouteruriPattern - The URI pattern that must match the relative part of the
resource URI.target - The target Restlet to attach.matchingMode - The matching mode.
public TemplateRoute attach(Restlet target)
RouterRouter.getMatchingMode(Restlet) will be added routing to the target
when any call is received.
attach in class Routertarget - The target Restlet to attach.
public TemplateRoute attach(String uriPattern,
Restlet target)
RouterRouter.getMatchingMode(Restlet) will be added routing to the target
when calls with a URI matching the pattern will be received.
attach in class RouteruriPattern - The URI path template that must match the relative part of the
resource URI.target - The target Restlet to attach.
public TemplateRoute attachDefault(Restlet defaultTarget)
Router
attachDefault in class RouterdefaultTarget - The Restlet to use as the default target.
public Finder createFinder(Class<? extends ServerResource> targetClass)
createFinder in class Restlet
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||