public interface RouteBuilder
Route using a fluent API. Sample Usage:
RouteBuilder routeBuilder = ...;
routeBuilder.from("/home")
.on(RequestMethod.GET)
.to(SampleController.class).index();
Route route = routeBuilder.build();
| Modifier and Type | Interface and Description |
|---|---|
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. |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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.Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.