Record Class PasteStart
java.lang.Object
java.lang.Record
com.vaadin.flow.component.clipboard.PasteStart
- Record Components:
pasteId- the paste sequence number; matches thePasteFile.pasteId()of the files about to be deliveredtotalFiles- the number of files the browser said the paste contains
- All Implemented Interfaces:
Serializable
Fired by the
onStart step of a PasteFileHandler.session()
once per paste, immediately before the paste's first PasteFile is
delivered. Carries the paste correlation token and the total file count the
browser declared (so a UI can show "0 / N" before any file has arrived).
The handler keeps a high-water mark of observed paste ids; an onStart
fires only for the latest paste seen, so late uploads from an older paste do
not regenerate a start event.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPasteStart(long pasteId, int totalFiles) Creates an instance of aPasteStartrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longpasteId()Returns the value of thepasteIdrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalFilesrecord component.
-
Constructor Details
-
PasteStart
public PasteStart(long pasteId, int totalFiles) Creates an instance of aPasteStartrecord class.- Parameters:
pasteId- the value for thepasteIdrecord componenttotalFiles- the value for thetotalFilesrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
pasteId
public long pasteId()Returns the value of thepasteIdrecord component.- Returns:
- the value of the
pasteIdrecord component
-
totalFiles
public int totalFiles()Returns the value of thetotalFilesrecord component.- Returns:
- the value of the
totalFilesrecord component
-