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.
Parses the response from fetching the attachment file into the corresponding value.
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionparse(CommandContext context, Attachment attachment, 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, Attachment attachment, reactor.netty.ByteBufMono body) throws InvalidArgumentException Parses the response from fetching the attachment file into the corresponding value.- Parameters:
context- The execution context.attachment- The attachment descriptor.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.
-