| Modifier and Type | Field and Description |
|---|---|
private Set<String> |
consumes |
private Set<RequestMethod> |
methods |
private List<Parameter<?>> |
parameters |
private String |
path |
private Set<MediaType> |
produces |
private Set<String> |
roles |
private Class<?> |
targetClass |
private Method |
targetMethod |
private Set<Class<? extends Throwable>> |
throwables |
| Constructor and Description |
|---|
DefaultRoute(RouteDescriptor descriptor)
Constructs a Route with the specified
RouteDescriptor configuration options. |
| Modifier and Type | Method and Description |
|---|---|
private Set<String> |
asSet(List<String> strings,
String defaultValue) |
private Set<MediaType> |
asSet(MediaType[] types) |
private Set<RequestMethod> |
asSet(RequestMethod[] methods) |
private Set<String> |
asSet(String[] strings) |
boolean |
canHandle(Throwable throwable)
Determines if this Route can handle the throwable.
|
Set<String> |
consumes()
Returns the media types that this Route is capable of consuming.
|
private static MediaType[] |
defaultMediaTypes() |
private static Set<Class<? extends Throwable>> |
emptyThrowableSet() |
Set<RequestMethod> |
getMethods()
Gets the
RequestMethods for this Route. |
List<Parameter<?>> |
getParameters()
Returns the Parameter's that this route accepts.
|
String |
getPath()
Gets the path for this Route.
|
Set<String> |
getRoles()
Gets this Routes associated roles.
|
Class<?> |
getTargetClass()
Gets the target class for this Route
|
Method |
getTargetMethod()
Gets the
Method of the target class for this Route. |
boolean |
hasExceptionsRoutes()
Determines if this Route contains one or more exception routes.
|
boolean |
isParameterized()
Determines if this Route's path is parameterized.
|
private boolean |
isPathCompatible(String path) |
boolean |
isSecured()
Determines if this Route has roles configured.
|
boolean |
matches(RequestMethod method,
String path,
Set<String> acceptHeaders)
Determines if this Route can handle the
RequestMethod and path combination. |
private boolean |
matchesProduces(Set<String> acceptHeaders) |
Set<MediaType> |
produces()
Returns the media types that this Route is capable of serving.
|
String |
toString() |
private final String path
private final Class<?> targetClass
private final Method targetMethod
private final Set<RequestMethod> methods
public DefaultRoute(RouteDescriptor descriptor)
RouteDescriptor configuration options.descriptor - the RouteDescriptor with the configured values.public Set<RequestMethod> getMethods()
RouteRequestMethods for this Route.getMethods in interface RouteRequestMethods, or an empty set.public String getPath()
Routepublic Class<?> getTargetClass()
RoutegetTargetClass in interface Routepublic boolean matches(RequestMethod method, String path, Set<String> acceptHeaders)
RouteRequestMethod and path combination.private boolean isPathCompatible(String path)
public Method getTargetMethod()
RouteMethod of the target class for this Route.getTargetMethod in interface Routepublic boolean isParameterized()
RouteisParameterized in interface Routetrue if this Route's path parameterized, otherwise false.public boolean isSecured()
Routepublic Set<String> getRoles()
Routepublic boolean hasExceptionsRoutes()
RoutehasExceptionsRoutes in interface Routetrue if this Route has one or more exception routes.public Set<MediaType> produces()
Routepublic List<Parameter<?>> getParameters()
RoutegetParameters in interface RouteParameter's that this route accepts.public Set<String> consumes()
Routepublic boolean canHandle(Throwable throwable)
Routeprivate Set<RequestMethod> asSet(RequestMethod[] methods)
private static MediaType[] defaultMediaTypes()
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.