Class UploadTempFiles

java.lang.Object
org.apache.pekko.http.scaladsl.server.directives.UploadTempFiles
All Implemented Interfaces:
org.apache.pekko.actor.Extension

public final class UploadTempFiles extends Object implements org.apache.pekko.actor.Extension
INTERNAL API

Temporary files for uploads that the application may never consume.

The files are collected in a directory of their own, one per actor system, that a CoordinatedShutdown task removes in the actor-system-terminate phase — after in-flight requests have been drained, matching the ordering that File.deleteOnExit provided (its hook runs only after all application shutdown hooks have finished; a raw Runtime.addShutdownHook would run concurrently with the drain and could delete files that requests still use). Registering every file with deleteOnExit instead would keep its path in a JVM-wide set for the lifetime of the process, also long after the file itself has been deleted, so that a long-running server accepting uploads would slowly grow its heap.

  • Constructor Summary

    Constructors
    Constructor
    Description
    UploadTempFiles(org.apache.pekko.actor.ExtendedActorSystem system)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static T
    apply(org.apache.pekko.actor.ActorSystem system)
     
    static T
    apply(org.apache.pekko.actor.ClassicActorSystemProvider system)
     
     
    createExtension(org.apache.pekko.actor.ExtendedActorSystem system)
     
    static final boolean
    equals(Object other)
     
    static T
    get(org.apache.pekko.actor.ActorSystem system)
     
    static T
    get(org.apache.pekko.actor.ClassicActorSystemProvider system)
     
    static final int
     

    Methods inherited from class java.lang.Object

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

    • UploadTempFiles

      public UploadTempFiles(org.apache.pekko.actor.ExtendedActorSystem system)
  • Method Details

    • createExtension

      public static UploadTempFiles createExtension(org.apache.pekko.actor.ExtendedActorSystem system)
    • apply

      public static T apply(org.apache.pekko.actor.ActorSystem system)
    • apply

      public static T apply(org.apache.pekko.actor.ClassicActorSystemProvider system)
    • get

      public static T get(org.apache.pekko.actor.ActorSystem system)
    • get

      public static T get(org.apache.pekko.actor.ClassicActorSystemProvider system)
    • hashCode

      public static final int hashCode()
    • equals

      public static final boolean equals(Object other)
    • create

      public File create()