org.jboss.aerogear.controller.router.error
Enum ErrorRoute
java.lang.Object
java.lang.Enum<ErrorRoute>
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.
|
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
|
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. |
DEFAULT
public static final ErrorRoute DEFAULT
route
private final Route route
exceptionAttributeName
private final String exceptionAttributeName
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)
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.