Class PeachHttpServer
java.lang.Object
cool.scx.http.peach.PeachHttpServer
- All Implemented Interfaces:
ScxHttpServer
-
Constructor Summary
ConstructorsConstructorDescriptionPeachHttpServer(ScxHttpServerOptions options) PeachHttpServer(ScxHttpServerOptions options, Function<ScxTCPServerOptions, ScxTCPServer> tcpServerBuilder) -
Method Summary
Modifier and TypeMethodDescriptionerrorHandler(Consumer<Throwable> handler) intport()requestHandler(Consumer<ScxHttpServerRequest> handler) voidstart()voidstop()webSocketHandler(Consumer<ScxServerWebSocket> handler)
-
Constructor Details
-
PeachHttpServer
public PeachHttpServer(ScxHttpServerOptions options, Function<ScxTCPServerOptions, ScxTCPServer> tcpServerBuilder) -
PeachHttpServer
-
PeachHttpServer
public PeachHttpServer()
-
-
Method Details
-
requestHandler
- Specified by:
requestHandlerin interfaceScxHttpServer
-
webSocketHandler
- Specified by:
webSocketHandlerin interfaceScxHttpServer
-
errorHandler
- Specified by:
errorHandlerin interfaceScxHttpServer
-
start
public void start()- Specified by:
startin interfaceScxHttpServer
-
stop
public void stop()- Specified by:
stopin interfaceScxHttpServer
-
port
public int port()- Specified by:
portin interfaceScxHttpServer
-