java.lang.Object
net.jonathangiles.tools.teenyhttpd.TeenyHttpd

public class TeenyHttpd extends Object
The TeenyHttpd server itself - instantiating an instance of this class and calling 'start()' is all that is required to begin serving requests.
  • Constructor Details

    • TeenyHttpd

      public TeenyHttpd(int port)
      Creates a single-threaded server that will work on the given port, although the server does not start until 'start()' is called.
      Parameters:
      port - The port for the server to listen to.
    • TeenyHttpd

      public TeenyHttpd(int port, Supplier<? extends ExecutorService> executorSupplier)
      Creates a server that will work on the given port, although the server does not start until 'start()' is called. The executor supplier enables creating ExecutorService instances that can handle requests with a range of different threading models.
      Parameters:
      port - The port for the server to listen to.
      executorSupplier - A ExecutorService instances that can handle requests with a range of different threading models.
  • Method Details