Class FileAndResourceDirectives.ResourceFile$
java.lang.Object
org.apache.pekko.http.scaladsl.server.directives.FileAndResourceDirectives.ResourceFile$
- All Implemented Interfaces:
Serializable
- Enclosing interface:
- FileAndResourceDirectives
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FileAndResourceDirectives.ResourceFile$Static reference to the singleton instance of this Scala object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionscala.Option<FileAndResourceDirectives.ResourceFile>Probes the resource without keeping any handle open: for a resource inside a jar file the jar is opened, read and closed again, as this overload always did before the jar file cache became configurable.scala.Option<FileAndResourceDirectives.ResourceFile>openConnection(URL url, boolean useJarFileCache) The one place that decides how a connection relates to the JDK's caches: with the jar file cache disabled the connection must own its jar file, with it enabled the JVM-wide default is left untouched, so that an application-wideURLConnection.setDefaultUseCaches(false)keeps its effect.
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
ResourceFile$
public ResourceFile$()
-
-
Method Details
-
apply
Probes the resource without keeping any handle open: for a resource inside a jar file the jar is opened, read and closed again, as this overload always did before the jar file cache became configurable. Use the two-argument overload to let the JDK's jar file cache keep the jar open across requests.- Parameters:
url- (undocumented)- Returns:
- (undocumented)
-
apply
- Parameters:
useJarFileCache- whether the JDK's jar file cache may be used for resources inside a jar file, see thepekko.http.routing.use-jar-file-cachesettingurl- (undocumented)- Returns:
- (undocumented)
- Since:
- 2.0.0
-
openConnection
The one place that decides how a connection relates to the JDK's caches: with the jar file cache disabled the connection must own its jar file, with it enabled the JVM-wide default is left untouched, so that an application-wideURLConnection.setDefaultUseCaches(false)keeps its effect.- Parameters:
url- (undocumented)useJarFileCache- (undocumented)- Returns:
- (undocumented)
-