-
public interface WebApplicationServerA handle that provides lifecycle methods to a web application server.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddListener(WebApplicationServerListener listener)Adds a listener to various eventsWebApplicationConfiggetConfiguration()Returns the configuration for this web application server.intgetPort()Get the local port the server is listening on for client connections.voidremoveListener(WebApplicationServerListener listener)Removes a listener to various eventsvoidstart()Starts the servervoidstop()Stops the server if the server fails to stop
-
-
-
Method Detail
-
start
void start() throws ExceptionStarts 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
-
-