java.lang.Object
com.github.mizosoft.methanol.adapter.ForwardingBodyAdapter
com.github.mizosoft.methanol.adapter.ForwardingDecoder
- All Implemented Interfaces:
BodyAdapter
,BodyAdapter.Decoder
A
BodyAdapter.Decoder
that forwards calls to another.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.github.mizosoft.methanol.BodyAdapter
BodyAdapter.Decoder, BodyAdapter.Encoder, BodyAdapter.Hints
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected BodyAdapter
delegate()
Returns the adapter calls are being forwarded to.<T> HttpResponse.BodySubscriber
<Supplier<T>> toDeferredObject
(TypeRef<T> typeRef, @Nullable MediaType mediaType) Returns a completedHttpResponse.BodySubscriber
that lazily decodes the response body into an object of the given type using the format specified by the given media type.<T> HttpResponse.BodySubscriber
<Supplier<T>> toDeferredObject
(TypeRef<T> typeRef, BodyAdapter.Hints hints) Returns a completedHttpResponse.BodySubscriber
that lazily decodes the response body into an object of the given type using the givenBodyAdapter.Hints
.<T> HttpResponse.BodySubscriber
<T> Returns aHttpResponse.BodySubscriber
that decodes the response body into an object of the given type using the format specified by the given media type.<T> HttpResponse.BodySubscriber
<T> toObject
(TypeRef<T> typeRef, BodyAdapter.Hints hints) Returns aHttpResponse.BodySubscriber
that decodes the response body into an object of the given type using the givenBodyAdapter.Hints
.Methods inherited from class com.github.mizosoft.methanol.adapter.ForwardingBodyAdapter
isCompatibleWith, supportsType, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.github.mizosoft.methanol.BodyAdapter
isCompatibleWith, supportsType
-
Constructor Details
-
ForwardingDecoder
-
-
Method Details
-
delegate
Description copied from class:ForwardingBodyAdapter
Returns the adapter calls are being forwarded to.- Specified by:
delegate
in classForwardingBodyAdapter
-
toObject
public <T> HttpResponse.BodySubscriber<T> toObject(TypeRef<T> typeRef, @Nullable MediaType mediaType) Description copied from interface:BodyAdapter.Decoder
Returns aHttpResponse.BodySubscriber
that decodes the response body into an object of the given type using the format specified by the given media type. If the given media type isnull
, the decoder's default format parameters (e.g., charset) are used.- Specified by:
toObject
in interfaceBodyAdapter.Decoder
-
toObject
Description copied from interface:BodyAdapter.Decoder
Returns aHttpResponse.BodySubscriber
that decodes the response body into an object of the given type using the givenBodyAdapter.Hints
.- Specified by:
toObject
in interfaceBodyAdapter.Decoder
-
toDeferredObject
public <T> HttpResponse.BodySubscriber<Supplier<T>> toDeferredObject(TypeRef<T> typeRef, @Nullable MediaType mediaType) Description copied from interface:BodyAdapter.Decoder
Returns a completedHttpResponse.BodySubscriber
that lazily decodes the response body into an object of the given type using the format specified by the given media type. IfmediaType
isnull
, the decoder uses its default format parameters (e.g., charset).- Specified by:
toDeferredObject
in interfaceBodyAdapter.Decoder
-
toDeferredObject
public <T> HttpResponse.BodySubscriber<Supplier<T>> toDeferredObject(TypeRef<T> typeRef, BodyAdapter.Hints hints) Description copied from interface:BodyAdapter.Decoder
Returns a completedHttpResponse.BodySubscriber
that lazily decodes the response body into an object of the given type using the givenBodyAdapter.Hints
.- Specified by:
toDeferredObject
in interfaceBodyAdapter.Decoder
-