Class ForwardingDecoder
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 BodyAdapter
BodyAdapter.Decoder, BodyAdapter.Encoder, BodyAdapter.Hints -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected BodyAdapterdelegate()Returns the adapter calls are being forwarded to.<T> HttpResponse.BodySubscriber<Supplier<T>> toDeferredObject(TypeRef<T> typeRef, @Nullable MediaType mediaType) Returns a completedHttpResponse.BodySubscriberthat 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.BodySubscriberthat lazily decodes the response body into an object of the given type using the givenBodyAdapter.Hints.<T> HttpResponse.BodySubscriber<T> Returns aHttpResponse.BodySubscriberthat 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.BodySubscriberthat decodes the response body into an object of the given type using the givenBodyAdapter.Hints.Methods inherited from class ForwardingBodyAdapter
isCompatibleWith, supportsType, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface BodyAdapter
isCompatibleWith, supportsType
-
Constructor Details
-
ForwardingDecoder
-
-
Method Details
-
delegate
Description copied from class:ForwardingBodyAdapterReturns the adapter calls are being forwarded to.- Specified by:
delegatein classForwardingBodyAdapter
-
toObject
public <T> HttpResponse.BodySubscriber<T> toObject(TypeRef<T> typeRef, @Nullable MediaType mediaType) Description copied from interface:BodyAdapter.DecoderReturns aHttpResponse.BodySubscriberthat 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:
toObjectin interfaceBodyAdapter.Decoder
-
toObject
Description copied from interface:BodyAdapter.DecoderReturns aHttpResponse.BodySubscriberthat decodes the response body into an object of the given type using the givenBodyAdapter.Hints.- Specified by:
toObjectin interfaceBodyAdapter.Decoder
-
toDeferredObject
public <T> HttpResponse.BodySubscriber<Supplier<T>> toDeferredObject(TypeRef<T> typeRef, @Nullable MediaType mediaType) Description copied from interface:BodyAdapter.DecoderReturns a completedHttpResponse.BodySubscriberthat lazily decodes the response body into an object of the given type using the format specified by the given media type. IfmediaTypeisnull, the decoder uses its default format parameters (e.g., charset).- Specified by:
toDeferredObjectin interfaceBodyAdapter.Decoder
-
toDeferredObject
public <T> HttpResponse.BodySubscriber<Supplier<T>> toDeferredObject(TypeRef<T> typeRef, BodyAdapter.Hints hints) Description copied from interface:BodyAdapter.DecoderReturns a completedHttpResponse.BodySubscriberthat lazily decodes the response body into an object of the given type using the givenBodyAdapter.Hints.- Specified by:
toDeferredObjectin interfaceBodyAdapter.Decoder
-