Class FaviconHandler

java.lang.Object
io.vertx.mutiny.ext.web.handler.FaviconHandler
All Implemented Interfaces:
MutinyDelegate, io.vertx.core.Handler<RoutingContext>, PlatformHandler, Consumer<RoutingContext>

public class FaviconHandler extends Object implements io.vertx.core.Handler<RoutingContext>, PlatformHandler, Consumer<RoutingContext>, MutinyDelegate
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.

NOTE: This class has been automatically generated from the original non Mutiny-ified interface.

Author:
Tim Fox
See Also:
  • FaviconHandler
  • Field Details

    • DEFAULT_MAX_AGE_SECONDS

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

      public static final TypeArg<FaviconHandler> __TYPE_ARG
  • Constructor Details

    • FaviconHandler

      public FaviconHandler(io.vertx.ext.web.handler.FaviconHandler delegate)
      Create a new instance of FaviconHandler delegating to the given (non-null) instance of FaviconHandler.
    • FaviconHandler

      public FaviconHandler(Object delegate)
  • Method Details

    • accept

      public void accept(RoutingContext item)
      Handle an item. This method is generated from the original method."
      Specified by:
      accept in interface Consumer<RoutingContext>
      Specified by:
      accept in interface PlatformHandler
    • handle

      public void handle(RoutingContext item)
      Handle an item. This method is generated from the original method."
      Specified by:
      handle in interface io.vertx.core.Handler<RoutingContext>
      Specified by:
      handle in interface PlatformHandler
    • getDelegate

      public io.vertx.ext.web.handler.FaviconHandler getDelegate()
      Get the delegate instance.

      This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.

      Specified by:
      getDelegate in interface MutinyDelegate
      Specified by:
      getDelegate in interface PlatformHandler
      Returns:
      the delegate instance
    • create

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

      public 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

      public 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

      public 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
    • newInstance

      public static FaviconHandler newInstance(io.vertx.ext.web.handler.FaviconHandler delegate)
      Creates a new instance of the FaviconHandler.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object