Package org.restlet.engine.component
Class HostRoute
- java.lang.Object
- 
- org.restlet.Restlet
- 
- org.restlet.routing.Filter
- 
- org.restlet.routing.Route
- 
- org.restlet.engine.component.HostRoute
 
 
 
 
- 
- All Implemented Interfaces:
- org.restlet.Uniform
 
 public class HostRoute extends org.restlet.routing.RouteRoute 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.- Author:
- Jerome Louvel
 
- 
- 
Constructor SummaryConstructors Constructor Description HostRoute(org.restlet.routing.Router router, org.restlet.routing.VirtualHost target)Constructor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intbeforeHandle(org.restlet.Request request, org.restlet.Response response)Allows filtering before processing by the next Restlet.org.restlet.routing.VirtualHostgetVirtualHost()Returns the target virtual host.floatscore(org.restlet.Request request, org.restlet.Response response)Returns the score for a given call (between 0 and 1.0).voidsetNext(org.restlet.routing.VirtualHost next)Sets the next virtual host.- 
Methods inherited from class org.restlet.routing.FilterafterHandle, doHandle, getNext, handle, hasNext, setNext, setNext, start, stop
 
- 
 
- 
- 
- 
Method Detail- 
beforeHandleprotected int beforeHandle(org.restlet.Request request, org.restlet.Response response)Allows filtering before processing by the next Restlet. Set the base reference.- Overrides:
- beforeHandlein class- org.restlet.routing.Filter
- Parameters:
- request- The request to handle.
- response- The response to update.
- Returns:
- The continuation status.
 
 - 
getVirtualHostpublic org.restlet.routing.VirtualHost getVirtualHost() Returns the target virtual host.- Returns:
- The target virtual host.
 
 - 
scorepublic float score(org.restlet.Request request, org.restlet.Response response)Returns the score for a given call (between 0 and 1.0).- Specified by:
- scorein class- org.restlet.routing.Route
- Parameters:
- request- The request to score.
- response- The response to score.
- Returns:
- The score for a given call (between 0 and 1.0).
 
 - 
setNextpublic void setNext(org.restlet.routing.VirtualHost next) Sets the next virtual host.- Parameters:
- next- The next virtual host.
 
 
- 
 
-