Class/Object

fm.http.server

StaticFileHandler

Related Docs: object StaticFileHandler | package server

Permalink

final case class StaticFileHandler(roots: Seq[File], devMode: Boolean) extends StaticFileHandlerBase with Product with Serializable

Linear Supertypes
Serializable, Serializable, Product, Equals, StaticFileHandlerBase, RequestRouter, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StaticFileHandler
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. StaticFileHandlerBase
  7. RequestRouter
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new StaticFileHandler(roots: Seq[File], devMode: Boolean)

    Permalink

Type Members

  1. case class NormalResolvedFile(file: File, expirationSeconds: Int) extends ResolvedFile with Product with Serializable

    Permalink
    Attributes
    protected
    Definition Classes
    StaticFileHandlerBase
  2. case class RedirectResolvedFile(file: File, location: String) extends ResolvedFile with Product with Serializable

    Permalink
    Attributes
    protected
    Definition Classes
    StaticFileHandlerBase
  3. sealed trait ResolvedFile extends AnyRef

    Permalink
    Attributes
    protected
    Definition Classes
    StaticFileHandlerBase

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def afterShutdown(): Unit

    Permalink

    Called once web server shutdown is completed -- Should be idempotent

    Called once web server shutdown is completed -- Should be idempotent

    Definition Classes
    RequestRouter
  5. def afterStartup(): Unit

    Permalink

    Called after the web server is running but before ping is enabled -- Should be idempotent

    Called after the web server is running but before ping is enabled -- Should be idempotent

    Definition Classes
    RequestRouter
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def beforeShutdown(): Unit

    Permalink

    Called when web server shutdown is requested but before actually shutting down -- Should be idempotent

    Called when web server shutdown is requested but before actually shutting down -- Should be idempotent

    Definition Classes
    RequestRouter
  8. def beforeStartup(): Unit

    Permalink

    Called before the web server starts up -- Should be idempotent

    Called before the web server starts up -- Should be idempotent

    Definition Classes
    RequestRouter
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. val devMode: Boolean

    Permalink
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def getTimestampedPath(path: String): Option[String]

    Permalink

    Given a file path return the timestamped version of the path if it exists

    Given a file path return the timestamped version of the path if it exists

    e.g. Given "/js/foo.js" return something like "/js/foo.1470690999454.js" (if the file exists)

    Definition Classes
    StaticFileHandlerBase
  15. def handleFileSystemFile(request: Request, f: File, expirationSeconds: Int): Option[RequestHandler]

    Permalink

    This can be called by handleNormal for when the File refers to an actual file on the file system

    This can be called by handleNormal for when the File refers to an actual file on the file system

    Attributes
    protected
    Definition Classes
    StaticFileHandlerBase
  16. def handleNormal(request: Request, f: File, expirationSeconds: Int): Option[RequestHandler]

    Permalink
    Attributes
    protected
    Definition Classes
    StaticFileHandlerStaticFileHandlerBase
  17. final def isFileSystemDir(f: File): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    StaticFileHandlerBase
  18. final def isFileSystemFile(f: File): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    StaticFileHandlerBase
  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. def isValidDir(f: File): Boolean

    Permalink

    Is this a valid directory that we should check for an index file?

    Is this a valid directory that we should check for an index file?

    Note: If you don't want to use index files then this can just return false for everything.

    Attributes
    protected
    Definition Classes
    StaticFileHandlerStaticFileHandlerBase
  21. def isValidFile(f: File): Boolean

    Permalink

    Is this a valid file we can serve?

    Is this a valid file we can serve?

    Attributes
    protected
    Definition Classes
    StaticFileHandlerStaticFileHandlerBase
  22. def lastModified(f: File): Long

    Permalink

    Last modified timestamp for a file in milliseconds

    Last modified timestamp for a file in milliseconds

    Attributes
    protected
    Definition Classes
    StaticFileHandlerStaticFileHandlerBase
  23. final def lookup(request: Request): Option[RequestHandler]

    Permalink

    Given a request lookup a RequestHandler that can satisfy it

    Given a request lookup a RequestHandler that can satisfy it

    Definition Classes
    StaticFileHandlerBaseRequestRouter
  24. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. final def orElse(that: RequestRouter): RequestRouter

    Permalink

    If this router doesn't match the request then try that router

    If this router doesn't match the request then try that router

    Definition Classes
    RequestRouter
  28. val roots: Seq[File]

    Permalink

    Root paths to search (in order) to find a matching file

    Root paths to search (in order) to find a matching file

    Definition Classes
    StaticFileHandlerStaticFileHandlerBase
  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  30. final def timestampedPath(path: String): String

    Permalink

    Given a file path return the timestamped version of the path.

    Given a file path return the timestamped version of the path.

    Note: If the file doesn't exist then the path is returned unmodified

    e.g. Given "/js/foo.js" return something like "/js/foo.1470690999454.js" (assuming the file exists)

    Definition Classes
    StaticFileHandlerBase
  31. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def withDefaultHandler(handler: RequestHandler): RequestRouter

    Permalink

    If this request router does not match a request then send the request to the specified default handler

    If this request router does not match a request then send the request to the specified default handler

    Definition Classes
    RequestRouter
  35. final def withErrorHandler(handler: ErrorRequestHandler)(implicit ec: ExecutionContext): RequestRouter

    Permalink

    If a RequestHandler throws an Exception then run this handler.

    If a RequestHandler throws an Exception then run this handler. Useful for showing an Error Page when a request fails

    Definition Classes
    RequestRouter
  36. final def withFilter(filter: Option[RequestFilter]): RequestRouter

    Permalink

    Run any RequestHandlers returned by this RequestRouter through an optional RequestFilter

    Run any RequestHandlers returned by this RequestRouter through an optional RequestFilter

    Definition Classes
    RequestRouter
  37. final def withFilter(filter: RequestFilter): RequestRouter

    Permalink

    Run any RequestHandlers returned by this RequestRouter through a RequestFilter

    Run any RequestHandlers returned by this RequestRouter through a RequestFilter

    Definition Classes
    RequestRouter
  38. final def withFilters(filters: TraversableOnce[RequestFilter]): RequestRouter

    Permalink

    Run any RequestHandlers returned by this RequestRouter through a sequence of RequestFilter

    Run any RequestHandlers returned by this RequestRouter through a sequence of RequestFilter

    Definition Classes
    RequestRouter

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from StaticFileHandlerBase

Inherited from RequestRouter

Inherited from AnyRef

Inherited from Any

Ungrouped