public class RouteDescriptor extends Object implements RouteBuilder.OnMethods, RouteBuilder.TargetEndpoint
| Modifier and Type | Class and Description |
|---|---|
private static class |
RouteDescriptor.FinalizeFilter |
private static class |
RouteDescriptor.MyMethodInterceptor |
| Modifier and Type | Field and Description |
|---|---|
private Object[] |
args |
private List<String> |
consumes |
private static RouteDescriptor.FinalizeFilter |
FINALIZE_FILTER |
private RequestMethod[] |
methods |
private List<Parameter<?>> |
parameters |
private String |
path |
private MediaType[] |
produces |
private String[] |
roles |
private Class<?> |
targetClass |
private Method |
targetMethod |
private Set<Class<? extends Throwable>> |
throwables |
| Constructor and Description |
|---|
RouteDescriptor() |
| Modifier and Type | Method and Description |
|---|---|
void |
addParameter(Parameter<?> parameter) |
RouteBuilder.TargetEndpoint |
consumes(MediaType... consumes)
Specifies the media types that this endpoint can consumes.
|
RouteBuilder.TargetEndpoint |
consumes(String... consumes)
Specifies the media types that this endpoint can consumes.
|
List<String> |
getConsumes() |
RequestMethod[] |
getMethods() |
List<Parameter<?>> |
getParameters() |
String |
getPath() |
MediaType[] |
getProduces() |
String[] |
getRoles() |
Class<?> |
getTargetClass() |
Method |
getTargetMethod() |
Set<Class<? extends Throwable>> |
getThrowables() |
RouteBuilder.TargetEndpoint |
on(RequestMethod... methods)
Specifies which
RequestMethods should be supported by the Route. |
RouteBuilder.TargetEndpoint |
produces(MediaType... produces)
Specifies the MediaType's that this endpoint produces.
|
RouteBuilder.OnMethods |
roles(String... roles)
Specifies the roles that are allowed to invoke the target endpoint
|
RouteDescriptor |
setPath(String path)
Set the path for this instance.
|
RouteDescriptor |
setThrowables(Set<Class<? extends Throwable>> throwables) |
<T> T |
to(Class<T> clazz)
Specifies the target Class for the
Route. |
String |
toString() |
private List<String> |
toStrings(MediaType... mediaTypes) |
private String path
private Method targetMethod
private Object[] args
private RequestMethod[] methods
private Class<?> targetClass
private String[] roles
private MediaType[] produces
private static final RouteDescriptor.FinalizeFilter FINALIZE_FILTER
public RouteDescriptor setPath(String path)
path - the from path for this route.public RouteBuilder.TargetEndpoint on(RequestMethod... methods)
RouteBuilder.OnMethodsRequestMethods should be supported by the Route.on in interface RouteBuilder.OnMethodsmethods - the RequestMethods that should be supported.RouteBuilder.TargetEndpoint which is a builder for the destination for this Route.public RouteBuilder.OnMethods roles(String... roles)
RouteBuilder.OnMethodsroles in interface RouteBuilder.OnMethodsroles - the roles.RouteBuilder.OnMethods to support method chaining.public <T> T to(Class<T> clazz)
RouteBuilder.TargetEndpointRoute.to in interface RouteBuilder.TargetEndpointclazz - The class that will be the used as the target endpoint by the Route.public String getPath()
public RequestMethod[] getMethods()
public Method getTargetMethod()
public Class<?> getTargetClass()
public String[] getRoles()
public RouteDescriptor setThrowables(Set<Class<? extends Throwable>> throwables)
public RouteBuilder.TargetEndpoint produces(MediaType... produces)
RouteBuilder.TargetEndpointproduces in interface RouteBuilder.TargetEndpointproduces - the MediaTypes that this endpoint method can produce.RouteBuilder.TargetEndpoint to support method chaining.public MediaType[] getProduces()
public RouteBuilder.TargetEndpoint consumes(String... consumes)
RouteBuilder.TargetEndpointconsumes in interface RouteBuilder.TargetEndpointconsumes - the media types that this endpoint method can consume.RouteBuilder.TargetEndpoint to support method chaining.public RouteBuilder.TargetEndpoint consumes(MediaType... consumes)
RouteBuilder.TargetEndpointconsumes in interface RouteBuilder.TargetEndpointconsumes - the media types that this endpoint method can consume.RouteBuilder.TargetEndpoint to support method chaining.public void addParameter(Parameter<?> parameter)
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.