Class StreamingProgressEventImpl
- java.lang.Object
-
- com.vaadin.flow.server.communication.streaming.StreamingProgressEventImpl
-
- All Implemented Interfaces:
StreamVariable.StreamingEvent,StreamVariable.StreamingProgressEvent,Serializable
public final class StreamingProgressEventImpl extends Object implements StreamVariable.StreamingProgressEvent
Implementation forStreamVariable.StreamingProgressEvent.- Since:
- 1.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StreamingProgressEventImpl(String filename, String type, long contentLength, long bytesReceived)Streaming progress event constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetBytesReceived()Get the number of bytes streamed.longgetContentLength()Get the content length.StringgetFileName()Get the file name for the stream.StringgetMimeType()Get the mime type for the stream.-
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
-
-
-
-
Method Detail
-
getFileName
public final String getFileName()
Description copied from interface:StreamVariable.StreamingEventGet the file name for the stream.- Specified by:
getFileNamein interfaceStreamVariable.StreamingEvent- Returns:
- the file name of the streamed file if known
-
getMimeType
public final String getMimeType()
Description copied from interface:StreamVariable.StreamingEventGet the mime type for the stream.- Specified by:
getMimeTypein interfaceStreamVariable.StreamingEvent- Returns:
- the mime type of the streamed file if known
-
getContentLength
public final long getContentLength()
Description copied from interface:StreamVariable.StreamingEventGet the content length.- Specified by:
getContentLengthin interfaceStreamVariable.StreamingEvent- Returns:
- the length of the stream (in bytes) if known, else -1
-
getBytesReceived
public final long getBytesReceived()
Description copied from interface:StreamVariable.StreamingEventGet the number of bytes streamed.- Specified by:
getBytesReceivedin interfaceStreamVariable.StreamingEvent- Returns:
- then number of bytes streamed to StreamVariable
-
-