public class FaviconHandlerImpl extends Object implements FaviconHandler
DEFAULT_MAX_AGE_SECONDS| Constructor and Description |
|---|
FaviconHandlerImpl()
Create a new Favicon instance using a the default icon and cache for 1 day.
|
FaviconHandlerImpl(long maxAgeSeconds)
Create a new Favicon instance from the classpath and customizable cache period
|
FaviconHandlerImpl(String path)
Create a new Favicon instance using a file in the file system and cache for 1 day.
|
FaviconHandlerImpl(String path,
long maxAgeSeconds)
Create a new Favicon instance using a file in the file system and customizable cache period
|
| Modifier and Type | Method and Description |
|---|---|
void |
handle(RoutingContext ctx)
Something has happened, so handle it.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, create, create, createpublic FaviconHandlerImpl(String path, long maxAgeSeconds)
Router router = Router.router(vertx);
router.route().handler(FaviconHandler.create("/icons/icon.ico", 1000));
path - file path to iconmaxAgeSeconds - max allowed time to be cached in secondspublic FaviconHandlerImpl(long maxAgeSeconds)
Router router = Router.router(vertx); router.route().handler(FaviconHandler.create(1000));
maxAgeSeconds - max allowed time to be cached in secondspublic FaviconHandlerImpl(String path)
Router router = Router.router(vertx);
router.route().handler(FaviconHandler.create("/icons/icon.ico"));
path - file path to iconpublic FaviconHandlerImpl()
Router router = Router.router(vertx); router.route().handler(FaviconHandler.create());
public void handle(RoutingContext ctx)
Handlerhandle in interface Handler<RoutingContext>ctx - the event to handleCopyright © 2020. All rights reserved.