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

    Constructors
    Constructor
    Description
    FileUploadedToPageEvent(String componentPath, String name, long size, org.apache.commons.io.output.DeferredFileOutputStream deferredContent)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.commons.io.output.DeferredFileOutputStream
    Atomically claims ownership of the deferred content.
    void
    Releases the deferred content if it was never claimed by a listener.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FileUploadedToPageEvent

      public FileUploadedToPageEvent(String componentPath, String name, long size, org.apache.commons.io.output.DeferredFileOutputStream deferredContent)
  • 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. Returns null if 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 (via UploadedFile) is responsible for cleanup.
      Specified by:
      close in interface AutoCloseable