Class HTTPServer


  • public class HTTPServer
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      HTTPServer​(int port)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int addEventList​(java.util.concurrent.CompletableFuture<?> cf)  
      void notifyAllSubscribers​(HTTPEvent c)  
      static void sendResponse​(com.sun.net.httpserver.HttpExchange httpExchange, java.lang.String body)
      Returns a simple HTTP response with the body with code 200 (Ok)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HTTPServer

        public HTTPServer​(int port)
                   throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • sendResponse

        public static void sendResponse​(com.sun.net.httpserver.HttpExchange httpExchange,
                                        java.lang.String body)
                                 throws java.io.IOException
        Returns a simple HTTP response with the body with code 200 (Ok)
        Throws:
        java.io.IOException
      • notifyAllSubscribers

        public void notifyAllSubscribers​(HTTPEvent c)
      • addEventList

        public int addEventList​(java.util.concurrent.CompletableFuture<?> cf)