com.vaadin.flow.server.
Interface StreamResourceWriter
-
All Superinterfaces:
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 interface StreamResourceWriter extends Serializable
Output stream consumer. Implementation of this interface should write data into
OutputStream
instance provided as an argument to itsaccept(OutputStream, VaadinSession)
method.Since:
1.0
Author:
Vaadin Ltd
-
-
Method Summary
All Methods Modifier and Type Method Description void
accept​(OutputStream stream, VaadinSession session)
Handles
stream
(writes data to it) usingsession
as a context.
-
-
-
Method Detail
-
accept
void accept​(OutputStream stream, VaadinSession session) throws IOException
Handles
stream
(writes data to it) usingsession
as a context.Note that the method is not called under the session lock. It means that if implementation requires access to the application/session data then the session has to be locked explicitly.
Parameters:
stream
- data output streamsession
- vaadin sessionThrows:
IOException
- if an IO error occurred
-
-