Interface MultiPart.Parser.Listener
- All Known Implementing Classes:
 MultiPart.AbstractPartsListener
- Enclosing class:
 MultiPart.Parser
public static interface MultiPart.Parser.Listener
A listener for events emitted by a MultiPart.Parser.
- 
Method Summary
Modifier and TypeMethodDescriptiondefault voidCallback method invoked when the whole multipart content has been parsed.default voidCallback method invoked when the parser cannot parse the multipart content.default voidCallback method invoked when the begin of a new part is parsed.default voidonPartContent(Content.Chunk chunk) Callback method invoked when a part contentChunkhas been parsed.default voidCallback method invoked when the end of a part is parsed.default voidonPartHeader(String name, String value) Callback method invoked when a part header is parsed.default voidCallback method invoked when all the part headers have been parsed.default voidonViolation(MultiPartCompliance.Violation violation) Callback method invoked when the low level parser encounters a fundamental multipart violation 
- 
Method Details
- 
onPartBegin
default void onPartBegin()Callback method invoked when the begin of a new part is parsed.
 - 
onPartHeader
 - 
onPartHeaders
default void onPartHeaders()Callback method invoked when all the part headers have been parsed.
 - 
onPartContent
Callback method invoked when a part content
Chunkhas been parsed.The
Chunkmust beRetainable.retain()retained} if it not consumed by this method (for example, stored away for later use).- Parameters:
 chunk- the part content chunk
 - 
onPartEnd
default void onPartEnd()Callback method invoked when the end of a part is parsed.
 - 
onComplete
default void onComplete()Callback method invoked when the whole multipart content has been parsed.
 - 
onFailure
Callback method invoked when the parser cannot parse the multipart content.
- Parameters:
 failure- the failure cause
 - 
onViolation
Callback method invoked when the low level parser encounters a fundamental multipart violation
>- Parameters:
 violation- the violation detected
 
 -