Interface ReaderStrategy<T>

    • Method Detail

      • canRead

        boolean canRead​(@Nullable
                        Class<?> type,
                        @Nullable
                        String contentType)
        Whether the given object type is supported by this reader.
        Parameters:
        type - the type of object to check
        contentType - the content type for the read
        Returns:
        true if readable, false otherwise
      • read

        Mono<T> read​(Mono<ByteBuf> content,
                     Class<T> responseType)
        Read from the input message and encode to a single object.
        Parameters:
        content - the response contents
        responseType - the type of object in the response which must have been previously checked via canRead(Class, String)
        Returns:
        a Mono for the resolved response, according to the given response type