aerogear-controller 1.0.2

org.jboss.aerogear.controller.router
Class RouteBuilderImpl

java.lang.Object
  extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.aerogear.controller.router.RouteBuilder
RouteBuilder.OnMethods, RouteBuilder.TargetEndpoint
 
Field Summary
private  RouteDescriptor routeDescriptor
           
 
Constructor Summary
RouteBuilderImpl()
           
 
Method Summary
 Route build()
          Builds a Route using the information gathered from this builder.
private  Set<Class<? extends Throwable>> exceptions(Class<?>... exceptions)
           
 RouteBuilder.OnMethods from(String path)
          Specifies the request path that the Route will handle request from.
 RouteDescriptor getRouteDescriptor()
           
 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.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

routeDescriptor

private final RouteDescriptor routeDescriptor
Constructor Detail

RouteBuilderImpl

public RouteBuilderImpl()
Method Detail

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

aerogear-controller 1.0.2

Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.