Class BasicFileUploadService

java.lang.Object
com.levigo.jadice.web.demo.common.server.service.BasicFileUploadService

@Service public class BasicFileUploadService extends Object
Service, handling split Uploads
  • Constructor Details

    • BasicFileUploadService

      public BasicFileUploadService()
    • BasicFileUploadService

      public BasicFileUploadService(ScheduledExecutorService executor)
  • Method Details

    • onShutdown

      @PreDestroy public void onShutdown()
    • getInputStream

      public InputStream getInputStream(String uuid)
      Returns the InputStream for the given uuid. If no InputStream is contained an IllegalStateException is thrown.
      Parameters:
      uuid - the uuid for the document
      Returns:
      the InputStream
    • getSize

      public long getSize(String uuid)
      Returns the size of the document identified by the given uuid. If nothing is contained for the uuid an IllegalStateException is thrown.
      Parameters:
      uuid - the uuid for the document
      Returns:
      the InputStream
    • prepareUpload

      public String prepareUpload()
    • upload

      public void upload(String uuid, String data) throws IOException
      Throws:
      IOException
    • finish

      public void finish(String uuid)
    • cancel

      public void cancel(String uuid)