Package org.restlet.routing
Class Route
- java.lang.Object
- 
- org.restlet.Restlet
- 
- org.restlet.routing.Filter
- 
- org.restlet.routing.Route
 
 
 
- 
- All Implemented Interfaces:
- Uniform
 - Direct Known Subclasses:
- TemplateRoute
 
 public abstract class Route extends Filter Filter scoring the affinity of calls with the attached Restlet. The score is used by an associated Router in order to determine the most appropriate Restlet for a given call.
 
 Concurrency note: instances of this class or its subclasses can be invoked by several threads at the same time and therefore must be thread-safe. You should be especially careful when storing state in member variables.- Author:
- Jerome Louvel
- See Also:
- Template
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description RoutergetRouter()Returns the parent router.abstract floatscore(Request request, Response response)Returns the score for a given call (between 0 and 1.0).voidsetRouter(Router router)Sets the parent router.- 
Methods inherited from class org.restlet.routing.FilterafterHandle, beforeHandle, doHandle, getNext, handle, hasNext, setNext, setNext, start, stop
 - 
Methods inherited from class org.restlet.RestletcreateFinder, finalize, getApplication, getAuthor, getContext, getDescription, getFinderClass, getLogger, getName, getOwner, handle, handle, handle, isStarted, isStopped, setAuthor, setContext, setDescription, setFinderClass, setName, setOwner
 
- 
 
- 
- 
- 
Method Detail- 
getRouterpublic Router getRouter() Returns the parent router.- Returns:
- The parent router.
 
 - 
scorepublic abstract float score(Request request, Response response) Returns the score for a given call (between 0 and 1.0).- Parameters:
- request- The request to score.
- response- The response to score.
- Returns:
- The score for a given call (between 0 and 1.0).
 
 - 
setRouterpublic void setRouter(Router router) Sets the parent router.- Parameters:
- router- The parent router.
 
 
- 
 
-