public abstract class AbstractSerializer extends java.lang.Object implements Serializer
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<ContentType> |
supported |
| Constructor and Description |
|---|
AbstractSerializer() |
AbstractSerializer(java.util.List<MediaType> mediaTypes,
java.util.List<Charset> charsets) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<ContentType> |
contentTypes()
Supported
ContentType
for this Serializer |
net.eusashead.parquet.util.Option<ContentType> |
resolveContentType(java.util.Set<AcceptableContentType> accept)
Resolve the
ContentType
for the response based on what the
Serializer can support and
what the client can accept. |
boolean |
supports(ContentType contentType)
Does the
Serializer
support the supplied
ContentType |
protected void |
validate(net.eusashead.parquet.entity.Entity target,
net.eusashead.parquet.util.Option<ContentType> accept) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitserializeprotected final java.util.List<ContentType> supported
public net.eusashead.parquet.util.Option<ContentType> resolveContentType(java.util.Set<AcceptableContentType> accept)
SerializerContentType
for the response based on what the
Serializer can support and
what the client can accept.resolveContentType in interface SerializerOption possibly containing a resolved ContentTypepublic boolean supports(ContentType contentType)
SerializerSerializer
support the supplied
ContentTypesupports in interface SerializercontentType - ContentType to checkContentType is supportedpublic java.util.List<ContentType> contentTypes()
SerializerContentType
for this SerializercontentTypes in interface SerializerList of supported ContentTypeprotected void validate(net.eusashead.parquet.entity.Entity target,
net.eusashead.parquet.util.Option<ContentType> accept)
throws ResponseException
ResponseException