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
- @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
-
def
handle(arg0: RoutingContext): Unit
- Definition Classes
- StaticHandler → Handler
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
setAllowRootFileSystemAccess(allowRootFileSystemAccess: Boolean): StaticHandler
Enable/Disable access to the root of the filesystem
Enable/Disable access to the root of the filesystem
- 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
Set whether async filesystem access should always be used
- 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
Set the server cache entry timeout when caching is enabled
- 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
Set whether cache header handling is enabled
- 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.
- 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
Set whether directory listing is enabled
- 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
Set the directory template to be used when directory listing
- 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
Set whether async/sync filesystem tuning should enabled
- 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.
- 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
Set whether files are read-only and will never change
- readOnly
whether files are read-only
- returns
a reference to this, so the API can be used fluently
-
def
setIncludeHidden(includeHidden: Boolean): StaticHandler
Set whether hidden files should be served
Set whether hidden files should be served
- 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
Set the index page
- 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
Set value for max age in caching headers
- 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
Set the max serve time in ns, above which serves are considered slow
- 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
Set the max cache size, when caching is enabled
- 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.
- 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
Set the web root
- webRoot
the web root
- 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
- @throws( ... )