| org.restlet.util.RouteList
RouteList | final public class RouteList extends WrapperList (Code) | | Modifiable list of routes with some helper methods. Note that this class
implements the java.util.List interface using the Route class as the generic
type. This allows you to use an instance of this class as any other
java.util.List, in particular all the helper methods in
java.util.Collections. Note that structural changes to this list
are thread-safe, using an underlying
java.util.concurrent.CopyOnWriteArrayList .
author: Jerome Louvel (contact@noelios.com) See Also: java.util.Collections See Also: java.util.List |
Method Summary | |
public Route | getBest(Request request, Response response, float requiredScore) Returns the best route match for a given call.
Parameters: request - The request to score. Parameters: response - The response to score. Parameters: requiredScore - The minimum score required to have a match. | public Route | getFirst(Request request, Response response, float requiredScore) Returns the first route match for a given call.
Parameters: request - The request to score. Parameters: response - The response to score. Parameters: requiredScore - The minimum score required to have a match. | public Route | getLast(Request request, Response response, float requiredScore) Returns the last route match for a given call.
Parameters: request - The request to score. Parameters: response - The response to score. Parameters: requiredScore - The minimum score required to have a match. | public Route | getNext(Request request, Response response, float requiredScore) Returns a next route match in a round robin mode for a given call.
Parameters: request - The request to score. Parameters: response - The response to score. Parameters: requiredScore - The minimum score required to have a match. | public Route | getRandom(Request request, Response response, float requiredScore) Returns a random route match for a given call.
Parameters: request - The request to score. Parameters: response - The response to score. Parameters: requiredScore - The minimum score required to have a match. | public void | removeAll(Restlet target) Removes all routes routing to a given target. | public RouteList | subList(int fromIndex, int toIndex) Returns a view of the portion of this list between the specified
fromIndex, inclusive, and toIndex, exclusive.
Parameters: fromIndex - The start position. Parameters: toIndex - The end position (exclusive). |
RouteList | public RouteList()(Code) | | Constructor.
|
RouteList | public RouteList(List<Route> delegate)(Code) | | Constructor.
Parameters: delegate - The delegate list. |
getBest | public Route getBest(Request request, Response response, float requiredScore)(Code) | | Returns the best route match for a given call.
Parameters: request - The request to score. Parameters: response - The response to score. Parameters: requiredScore - The minimum score required to have a match. The best route match or null. |
getFirst | public Route getFirst(Request request, Response response, float requiredScore)(Code) | | Returns the first route match for a given call.
Parameters: request - The request to score. Parameters: response - The response to score. Parameters: requiredScore - The minimum score required to have a match. The first route match or null. |
getLast | public Route getLast(Request request, Response response, float requiredScore)(Code) | | Returns the last route match for a given call.
Parameters: request - The request to score. Parameters: response - The response to score. Parameters: requiredScore - The minimum score required to have a match. The last route match or null. |
getNext | public Route getNext(Request request, Response response, float requiredScore)(Code) | | Returns a next route match in a round robin mode for a given call.
Parameters: request - The request to score. Parameters: response - The response to score. Parameters: requiredScore - The minimum score required to have a match. A next route or null. |
getRandom | public Route getRandom(Request request, Response response, float requiredScore)(Code) | | Returns a random route match for a given call.
Parameters: request - The request to score. Parameters: response - The response to score. Parameters: requiredScore - The minimum score required to have a match. A random route or null. |
removeAll | public void removeAll(Restlet target)(Code) | | Removes all routes routing to a given target.
Parameters: target - The target Restlet to detach. |
subList | public RouteList subList(int fromIndex, int toIndex)(Code) | | Returns a view of the portion of this list between the specified
fromIndex, inclusive, and toIndex, exclusive.
Parameters: fromIndex - The start position. Parameters: toIndex - The end position (exclusive). The sub-list. |
|
|