Package cloud.piranha.http.undertow
Class UndertowHttpServer
- java.lang.Object
-
- cloud.piranha.http.undertow.UndertowHttpServer
-
- All Implemented Interfaces:
HttpServer
public class UndertowHttpServer extends Object implements HttpServer
The Undertow HTTP server.- Author:
- Manfred Riem ([email protected])
-
-
Constructor Summary
Constructors Constructor Description UndertowHttpServer()
Constructor.UndertowHttpServer(int serverPort)
Constructor.UndertowHttpServer(int serverPort, HttpServerProcessor httpServerProcessor)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpServerProcessor
getHttpServerProcessor()
Get the http server processorint
getServerPort()
Get the server portboolean
getSSL()
Get the SSL flagboolean
isRunning()
Is the server running?void
setHttpServerProcessor(HttpServerProcessor httpServerProcessor)
Set the http server processorvoid
setServerPort(int serverPort)
Set the server portvoid
setSSL(boolean ssl)
Set the SSL flagvoid
start()
Start the server.void
stop()
Stops the server.
-
-
-
Constructor Detail
-
UndertowHttpServer
public UndertowHttpServer()
Constructor.
-
UndertowHttpServer
public UndertowHttpServer(int serverPort)
Constructor.- Parameters:
serverPort
- the server port.
-
UndertowHttpServer
public UndertowHttpServer(int serverPort, HttpServerProcessor httpServerProcessor)
Constructor.- Parameters:
serverPort
- the server port.httpServerProcessor
- the HTTP server processor.
-
-
Method Detail
-
isRunning
public boolean isRunning()
Is the server running?- Specified by:
isRunning
in interfaceHttpServer
- Returns:
- true if running, false otherwise.
-
start
public void start()
Start the server.- Specified by:
start
in interfaceHttpServer
-
stop
public void stop()
Stops the server.- Specified by:
stop
in interfaceHttpServer
-
getServerPort
public int getServerPort()
Description copied from interface:HttpServer
Get the server port- Specified by:
getServerPort
in interfaceHttpServer
- Returns:
- the server port
-
setServerPort
public void setServerPort(int serverPort)
Description copied from interface:HttpServer
Set the server port- Specified by:
setServerPort
in interfaceHttpServer
- Parameters:
serverPort
- the port
-
setSSL
public void setSSL(boolean ssl)
Description copied from interface:HttpServer
Set the SSL flag- Specified by:
setSSL
in interfaceHttpServer
- Parameters:
ssl
- the SSL flag
-
getSSL
public boolean getSSL()
Description copied from interface:HttpServer
Get the SSL flag- Specified by:
getSSL
in interfaceHttpServer
- Returns:
- the server port
-
setHttpServerProcessor
public void setHttpServerProcessor(HttpServerProcessor httpServerProcessor)
Description copied from interface:HttpServer
Set the http server processor- Specified by:
setHttpServerProcessor
in interfaceHttpServer
- Parameters:
httpServerProcessor
- the http server processor
-
getHttpServerProcessor
public HttpServerProcessor getHttpServerProcessor()
Description copied from interface:HttpServer
Get the http server processor- Specified by:
getHttpServerProcessor
in interfaceHttpServer
- Returns:
- the http server processor
-
-