|
aerogear-controller 1.0.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.aerogear.controller.router.RouteDescriptor
public class RouteDescriptor
Describes/configures a single route in AeroGear controller.
| Nested Class Summary | |
|---|---|
private static class |
RouteDescriptor.FinalizeFilter
|
private static class |
RouteDescriptor.MyMethodInterceptor
|
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
RouteDescriptor()
|
|
| Method Summary | ||
|---|---|---|
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)
|
|
|
to(Class<T> clazz)
Specifies the target Class for the Route. |
|
String |
toString()
|
|
private List<String> |
toStrings(MediaType... mediaTypes)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private String path
private Method targetMethod
private Object[] args
private RequestMethod[] methods
private Class<?> targetClass
private String[] roles
private final List<String> consumes
private final List<Parameter<?>> parameters
private MediaType[] produces
private Set<Class<? extends Throwable>> throwables
private static final RouteDescriptor.FinalizeFilter FINALIZE_FILTER
| Constructor Detail |
|---|
public RouteDescriptor()
| Method Detail |
|---|
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.OnMethods
roles 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 String toString()
toString in class Objectpublic RouteDescriptor setThrowables(Set<Class<? extends Throwable>> throwables)
public Set<Class<? extends Throwable>> getThrowables()
public List<Parameter<?>> getParameters()
public RouteBuilder.TargetEndpoint produces(MediaType... produces)
RouteBuilder.TargetEndpoint
produces 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.TargetEndpoint
consumes 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.TargetEndpoint
consumes in interface RouteBuilder.TargetEndpointconsumes - the media types that this endpoint method can consume.
RouteBuilder.TargetEndpoint to support method chaining.private List<String> toStrings(MediaType... mediaTypes)
public List<String> getConsumes()
public void addParameter(Parameter<?> parameter)
|
aerogear-controller 1.0.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||