vertx / io.vertx.reactivex.ext.web.handler / StaticHandler

StaticHandler

open class StaticHandler : Handler<RoutingContext>

A handler for serving static resources from the file system or classpath. NOTE: This class has been automatically generated from the io.vertx.ext.web.handler.StaticHandler non RX-ified interface using Vert.x codegen.

Constructors

<init>

StaticHandler(delegate: StaticHandler)

Properties

__TYPE_ARG

static val __TYPE_ARG: TypeArg<StaticHandler>

Functions

create

open static fun create(): StaticHandler

Create a handler using defaults

open static fun create(root: String): StaticHandler

Create a handler, specifying web-root

equals

open fun equals(other: Any?): Boolean

getDelegate

open fun getDelegate(): StaticHandler

handle

open fun handle(arg0: RoutingContext): Unit

hashCode

open fun hashCode(): Int

newInstance

open static fun newInstance(arg: StaticHandler): StaticHandler

setAllowRootFileSystemAccess

open fun setAllowRootFileSystemAccess(allowRootFileSystemAccess: Boolean): StaticHandler

Enable/Disable access to the root of the filesystem

setAlwaysAsyncFS

open fun setAlwaysAsyncFS(alwaysAsyncFS: Boolean): StaticHandler

Set whether async filesystem access should always be used

setCacheEntryTimeout

open fun setCacheEntryTimeout(timeout: Long): StaticHandler

Set the server cache entry timeout when caching is enabled

setCachingEnabled

open fun setCachingEnabled(enabled: Boolean): StaticHandler

Set whether cache header handling is enabled

setDefaultContentEncoding

open fun setDefaultContentEncoding(contentEncoding: String): StaticHandler

Set the default content encoding for text related files. This allows overriding the system settings default value.

setDirectoryListing

open fun setDirectoryListing(directoryListing: Boolean): StaticHandler

Set whether directory listing is enabled

setDirectoryTemplate

open fun setDirectoryTemplate(directoryTemplate: String): StaticHandler

Set the directory template to be used when directory listing

setEnableFSTuning

open fun setEnableFSTuning(enableFSTuning: Boolean): StaticHandler

Set whether async/sync filesystem tuning should enabled

setEnableRangeSupport

open fun setEnableRangeSupport(enableRangeSupport: Boolean): StaticHandler

Set whether range requests (resumable downloads; media streaming) should be enabled.

setFilesReadOnly

open fun setFilesReadOnly(readOnly: Boolean): StaticHandler

Set whether files are read-only and will never change

setHttp2PushMapping

open fun setHttp2PushMapping(http2PushMappings: MutableList<Http2PushMapping>): StaticHandler

Set the file mapping for http2push and link preload

setIncludeHidden

open fun setIncludeHidden(includeHidden: Boolean): StaticHandler

Set whether hidden files should be served

setIndexPage

open fun setIndexPage(indexPage: String): StaticHandler

Set the index page

setMaxAgeSeconds

open fun setMaxAgeSeconds(maxAgeSeconds: Long): StaticHandler

Set value for max age in caching headers

setMaxAvgServeTimeNs

open fun setMaxAvgServeTimeNs(maxAvgServeTimeNanoSeconds: Long): StaticHandler

Set the max serve time in ns, above which serves are considered slow

setMaxCacheSize

open fun setMaxCacheSize(maxCacheSize: Int): StaticHandler

Set the max cache size, when caching is enabled

setSendVaryHeader

open fun setSendVaryHeader(varyHeader: Boolean): StaticHandler

Set whether vary header should be sent with response.

setWebRoot

open fun setWebRoot(webRoot: String): StaticHandler

Set the web root

toString

open fun toString(): String