public final class RouteList extends WrapperList<Route>
List
interface using the Route class as the generic
type. This allows you to use an instance of this class as any other
List
, in particular all the helper methods in Collections
.CopyOnWriteArrayList
.Collections
,
List
Constructor and Description |
---|
RouteList()
Constructor.
|
RouteList(java.util.List<Route> delegate)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Route |
getBest(Request request,
Response response,
float requiredScore)
Returns the best route match for a given call.
|
Route |
getFirst(Request request,
Response response,
float requiredScore)
Returns the first route match for a given call.
|
Route |
getLast(Request request,
Response response,
float requiredScore)
Returns the last route match for a given call.
|
Route |
getNext(Request request,
Response response,
float requiredScore)
Returns a next route match in a round robin mode for a given call.
|
Route |
getRandom(Request request,
Response response,
float requiredScore)
Returns a random route match for a given call.
|
void |
removeAll(Restlet target)
Removes all routes routing to a given target.
|
RouteList |
subList(int fromIndex,
int toIndex)
Returns a view of the portion of this list between the specified
fromIndex, inclusive, and toIndex, exclusive.
|
add, add, addAll, addAll, clear, contains, containsAll, equals, get, getDelegate, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, toArray, toArray, toString
public RouteList()
public RouteList(java.util.List<Route> delegate)
delegate
- The delegate list.public Route getBest(Request request, Response response, float requiredScore)
request
- The request to score.response
- The response to score.requiredScore
- The minimum score required to have a match.public Route getFirst(Request request, Response response, float requiredScore)
request
- The request to score.response
- The response to score.requiredScore
- The minimum score required to have a match.public Route getLast(Request request, Response response, float requiredScore)
request
- The request to score.response
- The response to score.requiredScore
- The minimum score required to have a match.public Route getNext(Request request, Response response, float requiredScore)
request
- The request to score.response
- The response to score.requiredScore
- The minimum score required to have a match.public Route getRandom(Request request, Response response, float requiredScore)
request
- The request to score.response
- The response to score.requiredScore
- The minimum score required to have a match.public void removeAll(Restlet target)
target
- The target Restlet to detach.public RouteList subList(int fromIndex, int toIndex)
subList
in interface java.util.List<Route>
subList
in class WrapperList<Route>
fromIndex
- The start position.toIndex
- The end position (exclusive).Copyright © 2005-2024 Restlet.