aerogear-controller 1.0.2

org.jboss.aerogear.controller.router.error
Enum ErrorRoute

java.lang.Object
  extended by java.lang.Enum<ErrorRoute>
      extended by org.jboss.aerogear.controller.router.error.ErrorRoute
All Implemented Interfaces:
Serializable, Comparable<ErrorRoute>

public enum ErrorRoute
extends Enum<ErrorRoute>

A singleton Route that acts as a catch-all error Route which is will be used when no explicit error route has been defined.


Enum Constant Summary
DEFAULT
           
 
Field Summary
private  String exceptionAttributeName
           
private  Route route
           
 
Method Summary
 String getExceptionAttrName()
          Returns the name of the request attribute for this ErrorRoute, which will be accessible by calling ServletRequest.getAttribute(String) method.
 Route getRoute()
          Returns an Route which is configured to route to an instance of ErrorTarget.
private
<T> T
param(Class<T> type)
           
static ErrorRoute valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ErrorRoute[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DEFAULT

public static final ErrorRoute DEFAULT
Field Detail

route

private final Route route

exceptionAttributeName

private final String exceptionAttributeName
Method Detail

values

public static ErrorRoute[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ErrorRoute c : ErrorRoute.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ErrorRoute valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getRoute

public Route getRoute()
Returns an Route which is configured to route to an instance of ErrorTarget.

Returns:
Route provided as a fallback when a route has no explicit error route defined.

getExceptionAttrName

public String getExceptionAttrName()
Returns the name of the request attribute for this ErrorRoute, which will be accessible by calling ServletRequest.getAttribute(String) method.

Returns:
String the name of the request attribute to get hold of the target exception.

param

private <T> T param(Class<T> type)

aerogear-controller 1.0.2

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