- All Known Implementing Classes:
JacksonBodyAdapter
,JsonbBodyAdapter
public interface BodyAdapter
Adaptor between beans and content of a request or response.
Typically converts between beans as JSON content.
-
Method Summary
Modifier and TypeMethodDescription<T> BodyReader
<T> beanReader
(Class<T> type) Return a BodyReader to read response content and convert to a bean.default <T> BodyReader
<T> beanReader
(Type type) Return a BodyReader to read response content and convert to a bean.<T> BodyWriter
<T> beanWriter
(Class<?> type) Return a BodyWriter to write beans of this type as request content.default <T> BodyWriter
<T> beanWriter
(Type type) Return a BodyWriter to write beans of this type as request content.<T> BodyReader
<List<T>> listReader
(Class<T> type) Return a BodyReader to read response content and convert to a list of beans.default <T> BodyReader
<List<T>> listReader
(Type type) Return a BodyReader to read response content and convert to a list of beans.
-
Method Details
-
beanWriter
Return a BodyWriter to write beans of this type as request content.- Parameters:
type
- The type of the bean this writer is for
-
beanWriter
Return a BodyWriter to write beans of this type as request content.- Parameters:
type
- The type of the bean this writer is for
-
beanReader
Return a BodyReader to read response content and convert to a bean.- Parameters:
type
- The bean type to convert the content to.
-
beanReader
Return a BodyReader to read response content and convert to a bean.- Parameters:
type
- The bean type to convert the content to.
-
listReader
Return a BodyReader to read response content and convert to a list of beans.- Parameters:
type
- The bean type to convert the content to.
-
listReader
Return a BodyReader to read response content and convert to a list of beans.- Parameters:
type
- The bean type to convert the content to.
-