Class ForwardingEncoder
java.lang.Object
com.github.mizosoft.methanol.adapter.ForwardingBodyAdapter
com.github.mizosoft.methanol.adapter.ForwardingEncoder
- All Implemented Interfaces:
BodyAdapter, BodyAdapter.Encoder
An
BodyAdapter.Encoder 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 BodyAdapter.Encoderdelegate()Returns the adapter calls are being forwarded to.Returns aHttpRequest.BodyPublisherthat encodes the given object into a request body using the format specified by the given media type.toBody(T value, TypeRef<T> typeRef, BodyAdapter.Hints hints) Returns aHttpRequest.BodyPublisherthat encodes the given object into a request body based on the givenTypeRef, using the given hintsBodyAdapter.Hintsfor encoder-specific customization.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
-
ForwardingEncoder
-
-
Method Details
-
delegate
Description copied from class:ForwardingBodyAdapterReturns the adapter calls are being forwarded to.- Specified by:
delegatein classForwardingBodyAdapter
-
toBody
Description copied from interface:BodyAdapter.EncoderReturns aHttpRequest.BodyPublisherthat encodes the given object into a request body using the format specified by the given media type. If the given media type isnull, the encoder uses its default format parameters (e.g., charset).- Specified by:
toBodyin interfaceBodyAdapter.Encoder
-
toBody
Description copied from interface:BodyAdapter.EncoderReturns aHttpRequest.BodyPublisherthat encodes the given object into a request body based on the givenTypeRef, using the given hintsBodyAdapter.Hintsfor encoder-specific customization.- Specified by:
toBodyin interfaceBodyAdapter.Encoder
-