| 
 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||
@Retention(value=RUNTIME) @Target(value=METHOD) public @interface Route
Route metadata for a route method.
| Optional Element Summary | |
|---|---|
|  java.lang.String | contentTypeThe content type to set in the response for this route. | 
|  java.lang.String[] | defaultParametersAssign parameter values if the parameters are not present in the HTTP request. | 
|  MediaType[] | expectedRequestMediaTypeThe expected media type of the request content. | 
|  MediaType[] | respondsToMediaRequestsThe type of media this route knows how to serve. | 
|  HttpMethod[] | respondsToMethodsThe HTTP methods this route method accepts. | 
|  boolean[] | returnedStringIsContentShould the Stringreturned from this method be sent directly to the client as the response? If the return type for this method is not aStringthis
 attribute is ignored. | 
|  java.lang.String[] | tagsThe tags associated with this route. | 
|  java.lang.String | valueThe route path pattern used to match HTTP requests to this route method. | 
public abstract java.lang.String value
public abstract HttpMethod[] respondsToMethods
public abstract MediaType[] respondsToMediaRequests
public abstract MediaType[] expectedRequestMediaType
The expected media type of the request content. Use this to tell Routes how to parse the content for RequestContent.
This should be used as a single value. Only the first value in the array will be used.
RequestContentpublic abstract java.lang.String contentType
 The content type to set in the response for this route. This can be overridden by calling ServletResponse.setContentType(String)
 from within the route method.
 
Routes.defaultContentType()public abstract boolean[] returnedStringIsContent
 Should the String returned from this method be sent directly to the client as the response? If the return type for this method is not a String this
 attribute is ignored.
 
This should be used as a single value. Only the first value in the array will be used.
Routes.defaultReturnedStringIsContent(), 
RoutesConfiguration.defaultReturnedStringIsContentpublic abstract java.lang.String[] defaultParameters
 Assign parameter values if the parameters are not present in the HTTP request. The default parameter values (when not explicitly provided) will be
 used to match the route method to the HTTP request (if applicable) and will also be present in RequestParameters.
 They will not be present in ServletRequest.getParameter(String).
 
The format of this attribute array is {"parameter1Name=parameter1DefaultValue", "parameter2Name=parameter2DefaultValue"...}.
public abstract java.lang.String[] tags
BeforeRoute.exceptTags(), 
BeforeRoute.onlyTags(), 
AfterRoute.exceptTags(), 
AfterRoute.onlyTags()| 
 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||