|
aerogear-controller 1.0.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.aerogear.controller.router.Routes
public class Routes
Routes is a collection of Route instances that are able to handle certain RequestMethod/requestURI
combinations.
| Field Summary | |
|---|---|
private List<Route> |
routes
|
| Constructor Summary | |
|---|---|
private |
Routes(List<RouteBuilder> routeBuilders)
|
| Method Summary | |
|---|---|
static Routes |
from(List<RouteBuilder> routes)
Factory method that constructs a Routes instance using the list of RouteBuilders provided. |
boolean |
hasRouteFor(RequestMethod method,
String requestURI,
Set<String> acceptHeaders)
Determines is there is a Route for the RequestMethod/URI combination. |
static RouteBuilder |
route()
Simple Factory method for creating a RouteBuilder which is used to define a route. |
Route |
routeFor(RequestMethod method,
String requestURI,
Set<String> acceptHeaders)
Returns the Route for the specified RequestMethod/URI combination. |
Route |
routeFor(Throwable throwable)
Returns the Route for the specified Throwable. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final List<Route> routes
| Constructor Detail |
|---|
private Routes(List<RouteBuilder> routeBuilders)
| Method Detail |
|---|
public static RouteBuilder route()
RouteBuilder which is used to define a route.
RouteBuilder which can be used to gather information about a Route.public static Routes from(List<RouteBuilder> routes)
Routes instance using the list of RouteBuilders provided.
routes - the list of RouteBuilders which will be used to create the Routes.
Routes with the Routes from the passed in list of RouteBuilders.public String toString()
toString in class Object
public boolean hasRouteFor(RequestMethod method,
String requestURI,
Set<String> acceptHeaders)
RequestMethod/URI combination.
method - the HTTP RequestMethod.requestURI - the URI.acceptHeaders - the accept headers provided, or an empty set if none were provided.
true if this Routes has a Route for the specified RequestMethod/URI combination
public Route routeFor(RequestMethod method,
String requestURI,
Set<String> acceptHeaders)
Route for the specified RequestMethod/URI combination.
method - the HTTP RequestMethod.requestURI - the URI.acceptHeaders - the accept headers provided, or an empty set if none were provided.
Route configured to server the RequestMethod/URI combination. Will throw a RuntimeException if
the specified RequestMethod/URI combination is not supported by this Routes instance.public Route routeFor(Throwable throwable)
Route for the specified Throwable.
throwable - the Throwable to match with a Route
Route an error Route that can the type of the passed-in Throwable, or if no error route
was specified a ErrorRoute.DEFAULT will be returned.
|
aerogear-controller 1.0.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||