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:
ClientRoute,HostRoute,TemplateRoute
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.
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:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.restlet.routing.Filter
afterHandle, beforeHandle, doHandle, getNext, handle, hasNext, setNext, setNext, start, stopMethods inherited from class org.restlet.Restlet
createFinder, finalize, getApplication, getAuthor, getContext, getDescription, getFinderClass, getLogger, getName, getOwner, handle, handle, handle, isStarted, isStopped, setAuthor, setContext, setDescription, setFinderClass, setName, setOwner
-
Constructor Details
-
Route
Constructor behaving as a simple extractor filter.- Parameters:
next- The next Restlet.
-
Route
Constructor.- Parameters:
router- The parent router.next- The next Restlet.
-
-
Method Details
-
getRouter
Returns the parent router.- Returns:
- The parent router.
-
score
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).
-
setRouter
Sets the parent router.- Parameters:
router- The parent router.
-