Class TemporaryHandler

    • Constructor Detail

      • TemporaryHandler

        public TemporaryHandler​(HttpHandler handler)
        Creates a temporary handler that removes itself after the first connection.
        Parameters:
        handler - handler to use
        Since:
        03.03.00
        See Also:
        HttpHandler
      • TemporaryHandler

        public TemporaryHandler​(HttpHandler handler,
                                long maxTime)
        Creates a temporary handler that removes itself after the first connection, or after the time expires.
        Parameters:
        handler - handler to use
        maxTime - how long the handler may exists for in milliseconds
        Since:
        03.03.00
        See Also:
        HttpHandler
      • TemporaryHandler

        public TemporaryHandler​(SimpleHttpServer server,
                                HttpHandler handler,
                                long maxTime)
        Creates a temporary handler that removes itself after the first connection, or after the time expires.
        Parameters:
        server - simple http server; required if you want SimpleHttpServer.getContexts() to work properly
        handler - handler to use
        maxTime - how long the handler may exists for in milliseconds
        Since:
        03.05.02
        See Also:
        SimpleHttpServer, HttpHandler