Interface AttachmentParserStages.Parser<T>

Type Parameters:
T - The result type.
All Known Subinterfaces:
AttachmentDataParser<T>, TextFileParser<T>
Enclosing class:
AttachmentParserStages
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface AttachmentParserStages.Parser<T>
Parses the response from fetching the attachment file into the corresponding value.
Since:
1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    parse(CommandContext context, reactor.netty.http.client.HttpClientResponse response, reactor.netty.ByteBufMono body)
    Parses the response from fetching the attachment file into the corresponding value.
  • Method Details

    • parse

      @SideEffectFree Mono<T> parse(CommandContext context, reactor.netty.http.client.HttpClientResponse response, reactor.netty.ByteBufMono body) throws InvalidArgumentException
      Parses the response from fetching the attachment file into the corresponding value.
      Parameters:
      context - The execution context.
      response - The response metadata.
      body - The response body.
      Returns:
      A Mono that issues the parsed argument. If the content is invalid, it may fail with a InvalidArgumentException.
      Throws:
      InvalidArgumentException - if the given response is not valid.