class StaticHandler extends Handler[RoutingContext]
A handler for serving static resources from the file system or classpath.
- Alphabetic
- By Inheritance
- StaticHandler
- Handler
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new StaticHandler(_asJava: AnyRef)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asJava: AnyRef
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
handle(arg0: RoutingContext): Unit
- Definition Classes
- StaticHandler → Handler
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
setAllowRootFileSystemAccess(allowRootFileSystemAccess: Boolean): StaticHandler
Enable/Disable access to the root of the filesystem * @param allowRootFileSystemAccess whether root access is allowed
Enable/Disable access to the root of the filesystem * @param allowRootFileSystemAccess whether root access is allowed
- returns
a reference to this, so the API can be used fluently
-
def
setAlwaysAsyncFS(alwaysAsyncFS: Boolean): StaticHandler
Set whether async filesystem access should always be used * @param alwaysAsyncFS true for always async FS access
Set whether async filesystem access should always be used * @param alwaysAsyncFS true for always async FS access
- returns
a reference to this, so the API can be used fluently
-
def
setCacheEntryTimeout(timeout: Long): StaticHandler
Set the server cache entry timeout when caching is enabled * @param timeout the timeout, in ms
Set the server cache entry timeout when caching is enabled * @param timeout the timeout, in ms
- returns
a reference to this, so the API can be used fluently
-
def
setCachingEnabled(enabled: Boolean): StaticHandler
Set whether cache header handling is enabled * @param enabled true if enabled
Set whether cache header handling is enabled * @param enabled true if enabled
- returns
a reference to this, so the API can be used fluently
-
def
setDefaultContentEncoding(contentEncoding: String): StaticHandler
Set the default content encoding for text related files.
Set the default content encoding for text related files. This allows overriding the system settings default value. * @param contentEncoding the desired content encoding e.g.: "UTF-8"
- returns
a reference to this, so the API can be used fluently
-
def
setDirectoryListing(directoryListing: Boolean): StaticHandler
Set whether directory listing is enabled * @param directoryListing true if enabled
Set whether directory listing is enabled * @param directoryListing true if enabled
- returns
a reference to this, so the API can be used fluently
-
def
setDirectoryTemplate(directoryTemplate: String): StaticHandler
Set the directory template to be used when directory listing * @param directoryTemplate the directory template
Set the directory template to be used when directory listing * @param directoryTemplate the directory template
- returns
a reference to this, so the API can be used fluently
-
def
setEnableFSTuning(enableFSTuning: Boolean): StaticHandler
Set whether async/sync filesystem tuning should enabled * @param enableFSTuning true to enabled FS tuning
Set whether async/sync filesystem tuning should enabled * @param enableFSTuning true to enabled FS tuning
- returns
a reference to this, so the API can be used fluently
-
def
setEnableRangeSupport(enableRangeSupport: Boolean): StaticHandler
Set whether range requests (resumable downloads; media streaming) should be enabled.
Set whether range requests (resumable downloads; media streaming) should be enabled. * @param enableRangeSupport true to enable range support
- returns
a reference to this, so the API can be used fluently
-
def
setFilesReadOnly(readOnly: Boolean): StaticHandler
Set whether files are read-only and will never change * @param readOnly whether files are read-only
Set whether files are read-only and will never change * @param readOnly whether files are read-only
- returns
a reference to this, so the API can be used fluently
-
def
setHttp2PushMapping(http2PushMappings: Buffer[Http2PushMapping]): StaticHandler
Set the file mapping for http2push and link preload * @param http2PushMappings the mapping for http2 push
Set the file mapping for http2push and link preload * @param http2PushMappings the mapping for http2 push
- returns
a reference to this, so the API can be used fluently
-
def
setIncludeHidden(includeHidden: Boolean): StaticHandler
Set whether hidden files should be served * @param includeHidden true if hidden files should be served
Set whether hidden files should be served * @param includeHidden true if hidden files should be served
- returns
a reference to this, so the API can be used fluently
-
def
setIndexPage(indexPage: String): StaticHandler
Set the index page * @param indexPage the index page
Set the index page * @param indexPage the index page
- returns
a reference to this, so the API can be used fluently
-
def
setMaxAgeSeconds(maxAgeSeconds: Long): StaticHandler
Set value for max age in caching headers * @param maxAgeSeconds maximum time for browser to cache, in seconds
Set value for max age in caching headers * @param maxAgeSeconds maximum time for browser to cache, in seconds
- returns
a reference to this, so the API can be used fluently
-
def
setMaxAvgServeTimeNs(maxAvgServeTimeNanoSeconds: Long): StaticHandler
Set the max serve time in ns, above which serves are considered slow * @param maxAvgServeTimeNanoSeconds max serve time, in ns
Set the max serve time in ns, above which serves are considered slow * @param maxAvgServeTimeNanoSeconds max serve time, in ns
- returns
a reference to this, so the API can be used fluently
-
def
setMaxCacheSize(maxCacheSize: Int): StaticHandler
Set the max cache size, when caching is enabled * @param maxCacheSize the max cache size
Set the max cache size, when caching is enabled * @param maxCacheSize the max cache size
- returns
a reference to this, so the API can be used fluently
-
def
setSendVaryHeader(varyHeader: Boolean): StaticHandler
Set whether vary header should be sent with response.
Set whether vary header should be sent with response. * @param varyHeader true to sent vary header
- returns
a reference to this, so the API can be used fluently
-
def
setWebRoot(webRoot: String): StaticHandler
Set the web root * @param webRoot the web root
Set the web root * @param webRoot the web root
- returns
a reference to this, so the API can be used fluently
-
def
skipCompressionForMediaTypes(mediaTypes: Set[String]): StaticHandler
Skip compression if the media type of the file to send is in the provided
mediaTypes
set.Skip compression if the media type of the file to send is in the provided
mediaTypes
set.Content-Encoding
header set toidentity
for the types present in themediaTypes
set * @param mediaTypes the set of mime types that are already compressed- returns
a reference to this, so the API can be used fluently
-
def
skipCompressionForSuffixes(fileSuffixes: Set[String]): StaticHandler
Skip compression if the suffix of the file to send is in the provided
fileSuffixes
set.Skip compression if the suffix of the file to send is in the provided
fileSuffixes
set.Content-Encoding
header set toidentity
for the suffixes present in thefileSuffixes
set * @param fileSuffixes the set of file suffixes that are already compressed- returns
a reference to this, so the API can be used fluently
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )