Interface BodyAdapter

  • 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 Detail

      • beanWriter

        <T> BodyWriter<T> beanWriter​(Class<?> type)
        Return a BodyWriter to write beans of this type as request content.
        Parameters:
        type - The type of the bean this writer is for
      • beanReader

        <T> BodyReader<T> beanReader​(Class<T> type)
        Return a BodyReader to read response content and convert to a bean.
        Parameters:
        type - The bean type to convert the content to.
      • listReader

        <T> BodyReader<List<T>> listReader​(Class<T> type)
        Return a BodyReader to read response content and convert to a list of beans.
        Parameters:
        type - The bean type to convert the content to.