- All Implemented Interfaces:
Serializable,Comparable<ContentType>,Constable
A construct that aggregates a two-part identifier of file formats and format contents transmitted on the Internet.
The two parts of a ContentType are its type and a subtype; separated by a forward slash (/).
The constants enumerated by ContentType correspond only to the specialized formats supported by the Java™ SDK for CloudEvents.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe content type for transports sending cloudevents in the compact Avro format.Content type associated with the JSON event formatThe content type for transports sending cloudevents in the protocol buffer format.The content type for transports sending cloudevents in XML format. -
Method Summary
Modifier and TypeMethodDescriptiontoString()Return a string consisting of the slash-delimited (/) two-part identifier for thisenumconstant.value()Return a string consisting of the slash-delimited (/) two-part identifier for thisenumconstant.static ContentTypeReturns the enum constant of this class with the specified name.static ContentType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
JSON
Content type associated with the JSON event format -
PROTO
The content type for transports sending cloudevents in the protocol buffer format. -
AVRO_COMPACT
The content type for transports sending cloudevents in the compact Avro format. -
XML
The content type for transports sending cloudevents in XML format.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
value
Return a string consisting of the slash-delimited (/) two-part identifier for thisenumconstant. -
toString
Return a string consisting of the slash-delimited (/) two-part identifier for thisenumconstant.- Overrides:
toStringin classEnum<ContentType>
-