Package org.eclipse.jetty.http
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 void
Callback method invoked when the whole multipart content has been parsed.default void
Callback method invoked when the parser cannot parse the multipart content.default void
Callback method invoked when the begin of a new part is parsed.default void
onPartContent
(Content.Chunk chunk) Callback method invoked when a part contentChunk
has been parsed.default void
Callback method invoked when the end of a part is parsed.default void
onPartHeader
(String name, String value) Callback method invoked when a part header is parsed.default void
Callback method invoked when all the part headers have been parsed.default void
onViolation
(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
Callback method invoked when a part header is parsed.
- Parameters:
name
- the header namevalue
- the header value
-
onPartHeaders
default void onPartHeaders()Callback method invoked when all the part headers have been parsed.
-
onPartContent
Callback method invoked when a part content
Chunk
has been parsed.The
Chunk
must 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
-