- All Known Implementing Classes:
DefaultHttpServer
public interface HttpServer
The HTTP Server API.
This API makes it possible to interact with an HTTP server implementation on a very basic level. It supports the following:
- Starting the server.
- Stopping the server.
- Checking if the server is running.
- Set/get the port of the server.
- Set/get the SSL flag.
- Set/get the HttpServerProcessor.
- Author:
- Manfred Riem ([email protected])
-
Method Summary
Modifier and Type Method Description HttpServerProcessor
getHttpServerProcessor()
Get the http server processorint
getServerPort()
Get the server portboolean
getSSL()
Get the SSL flagboolean
isRunning()
Check if the server is 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()
Stop the server.
-
Method Details
-
isRunning
boolean isRunning()Check if the server is running.- Returns:
- true if it is, false otherwise.
-
start
void start()Start the server. -
stop
void stop()Stop the server. -
getServerPort
int getServerPort()Get the server port- Returns:
- the server port
-
setServerPort
void setServerPort(int serverPort)Set the server port- Parameters:
serverPort
- the port
-
getSSL
boolean getSSL()Get the SSL flag- Returns:
- the server port
-
setSSL
void setSSL(boolean ssl)Set the SSL flag- Parameters:
ssl
- the SSL flag
-
getHttpServerProcessor
HttpServerProcessor getHttpServerProcessor()Get the http server processor- Returns:
- the http server processor
-
setHttpServerProcessor
Set the http server processor- Parameters:
httpServerProcessor
- the http server processor
-