- Type Parameters:
A
- the resource type
- All Superinterfaces:
Route<A>
A content route.
This is used to define route based on the content type of an input. For instance, in order to resolve a handler for an HTTP request with content-type: application/json
header, a content
route must be defined with media type application/json
targeting a handler accepting application/json
content.
- Since:
- 1.12
- Author:
- Jeremy Kuhn
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
ContentRoute.Extractor<A,
B extends ContentRoute<A>, C extends ContentRoute.Extractor<A, B, C>> A content route extractor.static interface
ContentRoute.Manager<A,
B, C extends ContentRoute<A>, D extends ContentRoute.Manager<A, B, C, D, E>, E extends Router<A, B, C, D, E>> A content route manager. -
Method Summary
Modifier and TypeMethodDescriptionReturns a media range defining the content types accepted by the route as defined by RFC 7231 Section 5.3.2.
-
Method Details
-
getContentType
String getContentType()Returns a media range defining the content types accepted by the route as defined by RFC 7231 Section 5.3.2.
- Returns:
- a media range or null
-