Package io.karatelabs.http
Class HttpServer
java.lang.Object
io.karatelabs.http.HttpServer
-
Method Summary
Modifier and TypeMethodDescriptionintgetPort()booleanisSsl()static voidstatic HttpServerstart(int port, io.netty.handler.ssl.SslContext sslContext, Function<HttpRequest, HttpResponse> handler) static HttpServerstart(int port, io.netty.handler.ssl.SslContext sslContext, Function<HttpRequest, HttpResponse> handler, SseHandler sseHandler) static HttpServerstart(int port, io.netty.handler.ssl.SslContext sslContext, Function<HttpRequest, HttpResponse> handler, SseHandler sseHandler, WsHandler wsHandler) static HttpServerstart(int port, Function<HttpRequest, HttpResponse> handler) static HttpServerstart(int port, Function<HttpRequest, HttpResponse> handler, SseHandler sseHandler) static HttpServerstart(int port, Function<HttpRequest, HttpResponse> handler, SseHandler sseHandler, WsHandler wsHandler) voidvoidvoidwaitSync()
-
Method Details
-
shutdownAll
public static void shutdownAll() -
start
-
start
public static HttpServer start(int port, Function<HttpRequest, HttpResponse> handler, SseHandler sseHandler) -
start
public static HttpServer start(int port, io.netty.handler.ssl.SslContext sslContext, Function<HttpRequest, HttpResponse> handler) -
start
public static HttpServer start(int port, io.netty.handler.ssl.SslContext sslContext, Function<HttpRequest, HttpResponse> handler, SseHandler sseHandler) -
start
public static HttpServer start(int port, Function<HttpRequest, HttpResponse> handler, SseHandler sseHandler, WsHandler wsHandler) -
start
public static HttpServer start(int port, io.netty.handler.ssl.SslContext sslContext, Function<HttpRequest, HttpResponse> handler, SseHandler sseHandler, WsHandler wsHandler) -
isSsl
public boolean isSsl() -
getPort
public int getPort() -
waitSync
public void waitSync() -
stopAndWait
public void stopAndWait() -
stopAsync
public void stopAsync()
-