Interface ContentRoute<A>

Type Parameters:
A - the resource type
All Superinterfaces:
Route<A>

public interface ContentRoute<A> extends 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:
  • 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