Class ClientFileUploadEvent
java.lang.Object
com.oorian.messaging.events.Event<ClientFileListener>
com.oorian.messaging.events.client.ClientEvent<ClientFileListener>
com.oorian.messaging.events.client.ClientFileEvent
com.oorian.messaging.events.client.ClientFileUploadEvent
Event fired when one or more files have been uploaded from the client to the server.
This event provides access to the uploaded files as ClientFile objects,
which contain the file data, name, size, and content type.
-
Constructor Summary
ConstructorsConstructorDescriptionClientFileUploadEvent(Integer id, List<ClientFile> files) Creates a ClientFileUploadEvent with the specified upload ID and files. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispatchTo(ClientFileListener listener) Dispatches this event to the specified listener.getFiles()Returns the list of uploaded files.intgetId()Returns the upload request identifier.Methods inherited from class com.oorian.messaging.events.client.ClientEvent
getSource, getTarget, setSource, setTarget
-
Constructor Details
-
ClientFileUploadEvent
Creates a ClientFileUploadEvent with the specified upload ID and files.- Parameters:
id- the upload request identifierfiles- the list of uploaded files
-
-
Method Details
-
getId
public int getId()Returns the upload request identifier.- Returns:
- the upload ID
-
getFiles
Returns the list of uploaded files.- Returns:
- the uploaded files
-
dispatchTo
Dispatches this event to the specified listener.Subclasses implement this method to call the appropriate handler method on the listener interface.
- Specified by:
dispatchToin classEvent<ClientFileListener>- Parameters:
listener- the listener to dispatch this event to
-