com.vaadin.flow.server.communication.streaming.
Class StreamingStartEventImpl
All Implemented Interfaces:
StreamVariable.StreamingEvent
, StreamVariable.StreamingStartEvent
, Serializable
Implementation for StreamVariable.StreamingStartEvent
.
Since:
1.0
See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionStreamingStartEventImpl
(String filename, String type, long contentLength) Streaming start event constructor.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
The owner of the StreamVariable can call this method to inform the implementation that this StreamVariable will not be used to accept more post.
final long
Get the number of bytes streamed.
final long
Get the content length.
final String
Get the file name for the stream.
final String
Get the mime type for the stream.
boolean
Get if stream resource should be unregistered.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.vaadin.flow.server.StreamVariable.StreamingEvent
getBytesReceived, getContentLength, getFileName, getMimeType
-
Constructor Details
-
StreamingStartEventImpl
Streaming start event constructor.
Parameters:
filename
- filenametype
- file typecontentLength
- content length
-
-
Method Details
-
disposeStreamVariable
public void disposeStreamVariable()Description copied from interface:
StreamVariable.StreamingStartEvent
The owner of the StreamVariable can call this method to inform the implementation that this StreamVariable will not be used to accept more post.
Specified by:
disposeStreamVariable
in interfaceStreamVariable.StreamingStartEvent
-
isDisposed
public boolean isDisposed()Get if stream resource should be unregistered.
Returns:
true if stream variable should be unregistered
-
getFileName
Description copied from interface:
StreamVariable.StreamingEvent
Get the file name for the stream.
Specified by:
getFileName
in interfaceStreamVariable.StreamingEvent
Returns:
the file name of the streamed file if known
-
getMimeType
Description copied from interface:
StreamVariable.StreamingEvent
Get the mime type for the stream.
Specified by:
getMimeType
in interfaceStreamVariable.StreamingEvent
Returns:
the mime type of the streamed file if known
-
getContentLength
public final long getContentLength()Description copied from interface:
StreamVariable.StreamingEvent
Get the content length.
Specified by:
getContentLength
in interfaceStreamVariable.StreamingEvent
Returns:
the length of the stream (in bytes) if known, else -1
-
getBytesReceived
public final long getBytesReceived()Description copied from interface:
StreamVariable.StreamingEvent
Get the number of bytes streamed.
Specified by:
getBytesReceived
in interfaceStreamVariable.StreamingEvent
Returns:
then number of bytes streamed to StreamVariable
-