E - enum type that implements this interfacepublic interface Producible<E extends Enum<E> & Producible<E>>
Enum that represents a finite set of
producible mime-types.
Can be used with @ReadOperation,
@ReadOperation and @ReadOperation
annotations to quickly define a list of produces values.
Producible types can also be injected into operations when the underlying
technology supports content negotiation. For example, with web based endpoints, the
value of the Producible enum is resolved using the Accept header of the
request. When multiple values are equally acceptable, the value with the highest
ordinal is used.
| Modifier and Type | Method and Description |
|---|---|
MimeType |
getProducedMimeType()
Mime type that can be produced.
|
default boolean |
isDefault()
Return if this enum value should be used as the default value when an accept header
of */* is provided, or if the
Accept header is missing. |
MimeType getProducedMimeType()
default boolean isDefault()
Accept header is missing. Only
one value can be marked as default. If no value is marked, then the value with the
highest ordinal is used as the default.