org.jboss.aerogear.controller.router
Class RouteBuilderImpl
java.lang.Object
org.jboss.aerogear.controller.router.RouteBuilderImpl
- All Implemented Interfaces:
- RouteBuilder, RouteDescriptorAccessor
public class RouteBuilderImpl
- extends Object
- implements RouteBuilder, RouteDescriptorAccessor
Concrete implementation of RouteBuilder.
- See Also:
RouteBuilder
routeDescriptor
private final RouteDescriptor routeDescriptor
RouteBuilderImpl
public RouteBuilderImpl()
from
public RouteBuilder.OnMethods from(String path)
- Description copied from interface:
RouteBuilder
- Specifies the request path that the
Route will handle request from.
- Specified by:
from in interface RouteBuilder
- Parameters:
path - the request path that the Route will handle request from.
- Returns:
RouteBuilder.OnMethods which enables further specialization of the types of requests that can be handled by the
Route.
build
public Route build()
- Description copied from interface:
RouteBuilder
- Builds a
Route using the information gathered from this builder.
- Specified by:
build in interface RouteBuilder
- Returns:
Route a Route instance configured by the this builder.
toString
public String toString()
- Overrides:
toString in class Object
on
public RouteBuilder.TargetEndpoint on(Class<? extends Throwable> exception,
Class<?>... exceptions)
- Description copied from interface:
RouteBuilder
- Specifies that this route should be able to handle any of the types of exceptions passed-in. The method is used to define
an error route.
- Specified by:
on in interface RouteBuilder
- Parameters:
exception - a single class of type, or subtype, Throwable.exceptions - zero or more classes of type, or subtypes, of Throwable.
- Returns:
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.
exceptions
private Set<Class<? extends Throwable>> exceptions(Class<?>... exceptions)
getRouteDescriptor
public RouteDescriptor getRouteDescriptor()
- Specified by:
getRouteDescriptor in interface RouteDescriptorAccessor
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.