Package com.vaadin.flow.server
Interface StreamResourceWriter
-
- 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.
@FunctionalInterface public interface StreamResourceWriter extends Serializable
Output stream consumer. Implementation of this interface should write data intoOutputStream
instance provided as an argument to itsaccept(OutputStream, VaadinSession)
method.- Since:
- 1.0
- Author:
- Vaadin Ltd
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
accept(OutputStream stream, VaadinSession session)
Handlesstream
(writes data to it) usingsession
as a context.
-
-
-
Method Detail
-
accept
void accept(OutputStream stream, VaadinSession session) throws IOException
Handlesstream
(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 session- Throws:
IOException
- if an IO error occurred
-
-