BEST, CUSTOM, FIRST, LAST, MODE_BEST_MATCH, MODE_CUSTOM, MODE_FIRST_MATCH, MODE_LAST_MATCH, MODE_NEXT_MATCH, MODE_RANDOM_MATCH, NEXT, RANDOM
Constructor and Description |
---|
InternalRouter(Context context)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Route |
attach(Restlet target)
Attaches a target Restlet to this router with an empty URI pattern.
|
Route |
attach(java.lang.String uriPattern,
Restlet target)
Attaches a target Restlet to this router based on a given URI pattern.
|
Route |
attachDefault(Restlet defaultTarget)
Attaches a Restlet to this router as the default target to invoke when no
route matches.
|
Finder |
createFinder(java.lang.Class<?> targetClass)
Creates a new finder instance based on the "targetClass" property.
|
protected Route |
createRoute(java.lang.String uriPattern,
Restlet target,
int matchingMode)
Creates a new route for the given URI pattern, target and matching mode.
|
attach, attach, attach, attach, attachDefault, createRoute, detach, detach, doHandle, getCustom, getDefaultMatchingMode, getDefaultMatchingQuery, getDefaultMatchQuery, getDefaultRoute, getFinderClass, getMatchingMode, getMaxAttempts, getNext, getRequiredScore, getRetryDelay, getRoutes, getRoutingMode, handle, logRoute, setDefaultMatchingMode, setDefaultMatchingQuery, setDefaultMatchQuery, setDefaultRoute, setFinderClass, setMaxAttempts, setRequiredScore, setRetryDelay, setRoutes, setRoutingMode, start, stop
finalize, getApplication, getAuthor, getContext, getDescription, getLogger, getName, getOwner, isStarted, isStopped, setAuthor, setContext, setDescription, setName, setOwner
public InternalRouter(Context context)
context
- protected Route createRoute(java.lang.String uriPattern, Restlet target, int matchingMode)
Router
Router.getDefaultMatchingQuery()
.createRoute
in class Router
uriPattern
- The URI pattern that must match the relative part of the
resource URI.target
- The target Restlet to attach.matchingMode
- The matching mode.public Route attach(Restlet target)
Router
Router.getMatchingMode(Restlet)
will be added routing to the target
when any call is received.public Route attach(java.lang.String uriPattern, Restlet target)
Router
Router.getMatchingMode(Restlet)
will be added routing to the target
when calls with a URI matching the pattern will be received.public Route attachDefault(Restlet defaultTarget)
Router
attachDefault
in class Router
defaultTarget
- The Restlet to use as the default target.public Finder createFinder(java.lang.Class<?> targetClass)
Router
createFinder
in class Router
targetClass
- The target Resource class to attach.Copyright © 2005-2012. All Rights Reserved.