Class StreamingErrorEventImpl
java.lang.Object
com.vaadin.flow.server.communication.streaming.StreamingErrorEventImpl
- All Implemented Interfaces:
StreamVariable.StreamingErrorEvent,StreamVariable.StreamingEvent,Serializable
public final class StreamingErrorEventImpl
extends Object
implements StreamVariable.StreamingErrorEvent
Implementation for
StreamVariable.StreamingErrorEvent.- Since:
- 1.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionStreamingErrorEventImpl(String filename, String type, long contentLength, long bytesReceived, Exception exception) Streaming error event constructor. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.server.StreamVariable.StreamingEvent
getBytesReceived, getContentLength, getFileName, getMimeType
-
Constructor Details
-
StreamingErrorEventImpl
public StreamingErrorEventImpl(String filename, String type, long contentLength, long bytesReceived, Exception exception) Streaming error event constructor.- Parameters:
filename- filenametype- file typecontentLength- content lengthbytesReceived- amount of bytes receivedexception- exception for stream failure
-
-
Method Details
-
getException
Description copied from interface:StreamVariable.StreamingErrorEventGet the exception that failed the stream.- Specified by:
getExceptionin interfaceStreamVariable.StreamingErrorEvent- Returns:
- the exception that caused the receiving not to finish cleanly
-
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
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
-