Class FileUploadModelDelegate.FileUploadedToPageEvent
java.lang.Object
com.inductiveautomation.perspective.gateway.components.FileUploadModelDelegate.FileUploadedToPageEvent
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
- FileUploadModelDelegate
public static class FileUploadModelDelegate.FileUploadedToPageEvent
extends Object
implements AutoCloseable
This is the event object for the route to post to the page's gauva event bus, to get picked up
by this delegate.
-
Constructor Summary
ConstructorsConstructorDescriptionFileUploadedToPageEvent(String componentPath, String name, long size, org.apache.commons.io.output.DeferredFileOutputStream deferredContent) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.commons.io.output.DeferredFileOutputStreamAtomically claims ownership of the deferred content.voidclose()Releases the deferred content if it was never claimed by a listener.
-
Constructor Details
-
FileUploadedToPageEvent
-
-
Method Details
-
claimContent
public org.apache.commons.io.output.DeferredFileOutputStream claimContent()Atomically claims ownership of the deferred content. The caller becomes responsible for closing it. Returnsnullif the content has already been claimed. -
close
public void close()Releases the deferred content if it was never claimed by a listener. If it was claimed, the listener (viaUploadedFile) is responsible for cleanup.- Specified by:
closein interfaceAutoCloseable
-