|
aerogear-controller 1.0.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface RouteBuilder
RouteBuilder builds a Route using a fluent API.
RouteBuilder routeBuilder = ...;
routeBuilder.from("/home")
.on(RequestMethod.GET)
.to(SampleController.class).index();
Route route = routeBuilder.build();
| Nested Class Summary | |
|---|---|
static interface |
RouteBuilder.OnMethods
A fluent API for further specializing the Route's destination/endpoint. |
static interface |
RouteBuilder.TargetEndpoint
Describes the target destination for the Route. |
| Method Summary | |
|---|---|
Route |
build()
Builds a Route using the information gathered from this builder. |
RouteBuilder.OnMethods |
from(String path)
Specifies the request path that the Route will handle request from. |
RouteBuilder.TargetEndpoint |
on(Class<? extends Throwable> exception,
Class<?>... exceptions)
Specifies that this route should be able to handle any of the types of exceptions passed-in. |
| Method Detail |
|---|
RouteBuilder.TargetEndpoint on(Class<? extends Throwable> exception,
Class<?>... exceptions)
exception - a single class of type, or subtype, Throwable.exceptions - zero or more classes of type, or subtypes, of Throwable.
RouteBuilder.TargetEndpoint to enable further configuration of the route, such as specifying the target class and
method that will be called when the exception(s) are thrown.RouteBuilder.OnMethods from(String path)
Route will handle request from.
path - the request path that the Route will handle request from.
RouteBuilder.OnMethods which enables further specialization of the types of requests that can be handled by the
Route.Route build()
Route using the information gathered from this builder.
Route a Route instance configured by the this builder.
|
aerogear-controller 1.0.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||