|
Restlet Framework 2.2.1 Java Standard Edition |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.Restlet
org.restlet.routing.Filter
org.restlet.routing.Route
org.restlet.engine.component.HostRoute
public class HostRoute
Route based on a target VirtualHost. 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.
Field Summary |
---|
Fields inherited from class org.restlet.routing.Filter |
---|
CONTINUE, SKIP, STOP |
Constructor Summary | |
---|---|
HostRoute(Router router,
VirtualHost target)
Constructor. |
Method Summary | |
---|---|
protected int |
beforeHandle(Request request,
Response response)
Allows filtering before processing by the next Restlet. |
VirtualHost |
getVirtualHost()
Returns the target virtual host. |
float |
score(Request request,
Response response)
Returns the score for a given call (between 0 and 1.0). |
void |
setNext(VirtualHost next)
Sets the next virtual host. |
Methods inherited from class org.restlet.routing.Route |
---|
getRouter, setRouter |
Methods inherited from class org.restlet.routing.Filter |
---|
afterHandle, doHandle, getNext, handle, hasNext, setNext, setNext, start, stop |
Methods 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HostRoute(Router router, VirtualHost target)
router
- The parent router.target
- The target virtual host.Method Detail |
---|
protected int beforeHandle(Request request, Response response)
beforeHandle
in class Filter
request
- The request to handle.response
- The response to update.
public VirtualHost getVirtualHost()
public float score(Request request, Response response)
score
in class Route
request
- The request to score.response
- The response to score.
public void setNext(VirtualHost next)
next
- The next virtual host.
|
Restlet Framework 2.2.1 Java Standard Edition |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |