Interface FaviconHandler

All Superinterfaces:
Handler<RoutingContext>, PlatformHandler

public interface FaviconHandler extends PlatformHandler
A handler that serves favicons.

If no file system path is specified it will attempt to serve a resource called `favicon.ico` from the classpath.

Author:
Tim Fox
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final long
    The default max age in seconds as set in the cache-control header
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    create(Vertx vertx)
    Create a handler with defaults
    create(Vertx vertx, long maxAgeSeconds)
    Create a handler with the specified max cache time
    create(Vertx vertx, String path)
    Create a handler attempting to load favicon file from the specified path
    create(Vertx vertx, String path, long maxAgeSeconds)
    Create a handler attempting to load favicon file from the specified path, and with the specified max cache time

    Methods inherited from interface Handler

    handle
  • Field Details

    • DEFAULT_MAX_AGE_SECONDS

      static final long DEFAULT_MAX_AGE_SECONDS
      The default max age in seconds as set in the cache-control header
      See Also:
  • Method Details

    • create

      static FaviconHandler create(Vertx vertx)
      Create a handler with defaults
      Returns:
      the handler
    • create

      static FaviconHandler create(Vertx vertx, String path)
      Create a handler attempting to load favicon file from the specified path
      Parameters:
      path - the path
      Returns:
      the handler
    • create

      static FaviconHandler create(Vertx vertx, String path, long maxAgeSeconds)
      Create a handler attempting to load favicon file from the specified path, and with the specified max cache time
      Parameters:
      path - the path
      maxAgeSeconds - max how long the file will be cached by browser, in seconds
      Returns:
      the handler
    • create

      static FaviconHandler create(Vertx vertx, long maxAgeSeconds)
      Create a handler with the specified max cache time
      Parameters:
      maxAgeSeconds - max how long the file will be cached by browser, in seconds
      Returns:
      the handler