-
public interface WebApplicationServer
A handle that provides lifecycle methods to a web application server.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addListener(WebApplicationServerListener listener)
Adds a listener to various eventsWebApplicationConfig
getConfiguration()
Returns the configuration for this web application server.int
getPort()
Get the local port the server is listening on for client connections.void
removeListener(WebApplicationServerListener listener)
Removes a listener to various eventsvoid
start()
Starts the servervoid
stop()
Stops the server if the server fails to stop
-
-
-
Method Detail
-
start
void start() throws Exception
Starts the server- Throws:
Exception
- if the server fails to start
-
getConfiguration
WebApplicationConfig getConfiguration()
Returns the configuration for this web application server.- Returns:
- the configuration
-
addListener
void addListener(WebApplicationServerListener listener)
Adds a listener to various events- Parameters:
listener
- the listener to add
-
removeListener
void removeListener(WebApplicationServerListener listener)
Removes a listener to various events- Parameters:
listener
- the listener to add
-
getPort
int getPort()
Get the local port the server is listening on for client connections. This allows returning the ephemeral port that the server is using if ephemeral ports are supported.- Returns:
- socket port
-
-