Package com.vaadin.flow.server.streams
Interface UploadCompleteCallback
- All Superinterfaces:
Serializable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Callback for validating a fully received upload before it is delivered, used
with
AbstractUploadHandler.validateComplete(UploadCompleteCallback).
Call UploadEvent.reject(String) to refuse the upload. See
UploadValidator.validateComplete(UploadEvent, UploadContent) for the
phase semantics; this runs only after the whole upload has been received, so
it cannot abort reading early.
-
Method Summary
Modifier and TypeMethodDescriptionvoidvalidate(UploadEvent event, UploadContent content) Validates the fully received upload, rejecting it viaUploadEvent.reject(String)if it must not be delivered.
-
Method Details
-
validate
Validates the fully received upload, rejecting it viaUploadEvent.reject(String)if it must not be delivered.- Parameters:
event- the current uploadcontent- handle to the received content; only valid for the duration of the call- Throws:
IOException- if validation fails; treated as a transfer error
-