Class HTTPServer
- java.lang.Object
-
- org.example.model.communication.server.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)
-
-
-
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)
-
-