vertx-lang-scala-docs_2.12 3.6.3 API < Back
 

# Packages

-  package root
  Definition Classes
    root
-  package io
  Definition Classes
    root
-  package vertx
  Definition Classes
    io
-  package scala
  Definition Classes
    vertx
-  package ext
  Definition Classes
    scala
-  package web
  Definition Classes
    ext
-  package handler
  Definition Classes
    web
-  package sockjs
  Definition Classes
    handler
- AuthHandler
- BasicAuthHandler
- BodyHandler
- CSRFHandler
- ChainAuthHandler
- CookieHandler
- CorsHandler
- DigestAuthHandler
- ErrorHandler
- FaviconHandler
- FormLoginHandler
- JWTAuthHandler
- LoggerHandler
- OAuth2AuthHandler
- RedirectAuthHandler
- ResponseContentTypeHandler
- ResponseTimeHandler
- SessionHandler
- StaticHandler
- TemplateHandler
- TimeoutHandler
- UserSessionHandler
- VirtualHostHandler

c

io.vertx.scala.ext.web.handler

# StaticHandler 

###
Companion object StaticHandler

#### class StaticHandler extends Handler[RoutingContext]

A handler for serving static resources from the file system or classpath.

Linear Supertypes
Handler[RoutingContext], AnyRef, Any
 
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. StaticHandler
2. Handler
3. AnyRef
4. Any

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Instance Constructors

1.  new StaticHandler(_asJava: AnyRef)

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##(): Int
   Definition Classes
     AnyRef → Any
3.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
4.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
5.  def asJava: AnyRef
6.  def clone(): AnyRef
   Attributes
     protected[java.lang]
   Definition Classes
     AnyRef
   Annotations
     @native() @throws( ... )
7.  final def eq(arg0: AnyRef): Boolean
   Definition Classes
     AnyRef
8.  def equals(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
9.  def finalize(): Unit
   Attributes
     protected[java.lang]
   Definition Classes
     AnyRef
   Annotations
     @throws( classOf[java.lang.Throwable] )
10.  final def getClass(): Class[_]
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
11.  def handle(arg0: RoutingContext): Unit
    Definition Classes
      StaticHandler → Handler
12.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
13.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
14.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
15.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
16.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
17.  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

18.  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

19.  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

20.  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

21.  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

22.  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

23.  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

24.  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

25.  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

26.  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

27.  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

28.  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

29.  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

30.  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

31.  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

32.  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

33.  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

34.  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

35.  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 to `identity` for the types present in the `mediaTypes` set * @param mediaTypes the set of mime types that are already compressed

    returns

      a reference to this, so the API can be used fluently

36.  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 to `identity` for the suffixes present in the `fileSuffixes` set * @param fileSuffixes the set of file suffixes that are already compressed

    returns

      a reference to this, so the API can be used fluently

37.  final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
      AnyRef
38.  def toString(): String
    Definition Classes
      AnyRef → Any
39.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
40.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
41.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @native() @throws( ... )

### Inherited from Handler[RoutingContext]

### Inherited from AnyRef

### Inherited from Any

### Ungrouped