Class ConfiguredPushHandler

  • All Implemented Interfaces:
    HttpHandler

    public class ConfiguredPushHandler
    extends java.lang.Object
    implements HttpHandler
    Handler that pushes resources based on a provided URL
    Author:
    Stuart Douglas
    • Constructor Detail

      • ConfiguredPushHandler

        public ConfiguredPushHandler​(HttpHandler next)
    • Method Detail

      • handleRequest

        public void handleRequest​(HttpServerExchange exchange)
                           throws java.lang.Exception
        Description copied from interface: HttpHandler
        Handle the request.
        Specified by:
        handleRequest in interface HttpHandler
        Parameters:
        exchange - the HTTP request/response exchange
        Throws:
        java.lang.Exception
      • addRoute

        public ConfiguredPushHandler addRoute​(java.lang.String url,
                                              java.lang.String... resourcesToPush)