public class Route
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Route.DTO
Representation of a DTO type.
|
static class |
Route.Param
Representation of a parameter of a REST route.
|
Modifier and Type | Field and Description |
---|---|
java.lang.String[] |
consumes
The media types consumed by the endpoint.
|
boolean |
deprecated
Whether the endpoint is deprecated.
|
Route.DTO |
inputType
A
Route.DTO representing the request body. |
java.lang.String[] |
methods
The supported
RequestMethod s, as strings. |
Route.Param[] |
params
An array of
Route.Param s, representing parameters accepted by the endpoint. |
java.lang.String[] |
paths
The paths of the endpoint.
|
java.lang.String[] |
produces
The media types produced by the endpoint.
|
Route.DTO |
returnType
A
Route.DTO representing the response body. |
Constructor and Description |
---|
Route(java.lang.String[] paths,
RequestMethod[] methods,
java.lang.String[] consumes,
java.lang.String[] produces,
boolean deprecated,
Route.DTO returnType,
Route.DTO inputType,
Route.Param... params)
The one and only constructor.
|
public final java.lang.String[] paths
public final java.lang.String[] methods
RequestMethod
s, as strings.public final java.lang.String[] produces
public final java.lang.String[] consumes
public final boolean deprecated
public final Route.Param[] params
Route.Param
s, representing parameters accepted by the endpoint.public Route(java.lang.String[] paths, RequestMethod[] methods, java.lang.String[] consumes, java.lang.String[] produces, boolean deprecated, Route.DTO returnType, Route.DTO inputType, Route.Param... params)
paths
- the paths of the endpointmethods
- the RequestMethod
s accepted by the endpointconsumes
- the media types consumed by the endpoint, may be nullproduces
- the media types produced by the endpoint, may be nulldeprecated
- whether the endpoint is deprecatedreturnType
- the DTO for the response type, may be nullinputType
- the DTO for the request type, may be nullparams
- Route.Param
s of the endpoint, may be null