Package org.n52.svalbard.encode
Interface Encoder<T,S>
- Type Parameters:
T- the resulting type, the "Target"S- the input type, the "Source"
- All Superinterfaces:
Component<EncoderKey>,Keyed<EncoderKey>
- All Known Subinterfaces:
ConformanceClassEncoder<T,,S> ObservationEncoder<S,,T> ProcedureEncoder<S,,T> SchemaAwareEncoder<T,,S> StreamingEncoder<T,S>
- All Known Implementing Classes:
AbstractDelegatingEncoder,UVFEncoder
Generic interface for Encoders.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionEncodes the specified object.encode(S objectToEncode, EncodingContext additionalValues) Encodes the specified object with the specified EncodingContext .default Set<SupportedType> Get theSupportedType
-
Method Details
-
encode
Encodes the specified object.- Parameters:
objectToEncode- the object to encode- Returns:
- the encoded object
- Throws:
EncodingException- if an error occurs
-
encode
Encodes the specified object with the specified EncodingContext .- Parameters:
objectToEncode- the object to encodeadditionalValues- the helper values- Returns:
- the encoded object
- Throws:
EncodingException- if an error occurs
-
getSupportedTypes
Get theSupportedType- Returns:
- the supported key types
-
getContentType
MediaType getContentType()- Returns:
- the content type of the encoded response.
-