-
- All Known Subinterfaces:
AbstractBodyAdapter.BaseDecoder,AbstractBodyAdapter.BaseEncoder,BodyAdapter.Decoder,BodyAdapter.Encoder
- All Known Implementing Classes:
AbstractBodyAdapter,BasicAdapter,ForwardingBodyAdapter,ForwardingDecoder,ForwardingEncoder
public interface BodyAdapterAn object that converts objects to or from request or response bodies respectively, using a defined format. The two specialized subtypes areBodyAdapter.EncoderandBodyAdapter.Decoder.A
BodyAdaptercommunicates the format it uses and the set of types it supports throughisCompatibleWith(MediaType)andsupportsType(TypeRef)respectively. For example, aBodyAdapterthat uses JSON is compatible with anyapplication/jsonmedia type, and supports any object type supported by the underlying serializer/deserializer.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceBodyAdapter.DecoderABodyAdapterthat decodes response bodies into objects.static interfaceBodyAdapter.EncoderABodyAdapterthat encodes objects into request bodies.static interfaceBodyAdapter.HintsA collection of hints that provide additional context to customize an adapter's encoding/decoding behavior.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisCompatibleWith(MediaType mediaType)Returnstrueif the format this adapter uses iscompatiblewith the given media type.booleansupportsType(TypeRef<?> typeRef)Returnstrueif this adapter supports the given type.
-
-
-
Method Detail
-
isCompatibleWith
boolean isCompatibleWith(MediaType mediaType)
Returnstrueif the format this adapter uses iscompatiblewith the given media type.
-
supportsType
boolean supportsType(TypeRef<?> typeRef)
Returnstrueif this adapter supports the given type.
-
-