Module cloud.piranha.appserver.api
Package cloud.piranha.appserver.api
Interface WebApplicationServer
- All Known Implementing Classes:
DefaultWebApplicationServer
public interface WebApplicationServer
The WebApplicationServer API.
- Author:
- Manfred Riem ([email protected])
-
Method Summary
Modifier and Type Method Description void
addWebApplication(WebApplication webApplication)
Add a web application.WebApplicationServerRequestMapper
getRequestMapper()
Get the request mapper.void
initialize()
Initialize the server.void
service(WebApplicationServerRequest request, WebApplicationServerResponse response)
Service the request and response.void
setRequestMapper(WebApplicationServerRequestMapper requestMapper)
Set the request mapper.void
start()
Start the server.void
stop()
Stop the server.
-
Method Details
-
addWebApplication
Add a web application.- Parameters:
webApplication
- the web application to add.
-
getRequestMapper
WebApplicationServerRequestMapper getRequestMapper()Get the request mapper.- Returns:
- the request mapper.
-
service
void service(WebApplicationServerRequest request, WebApplicationServerResponse response) throws java.io.IOException, ServletExceptionService the request and response.- Parameters:
request
- the request.response
- the response.- Throws:
java.io.IOException
- when an I/O error occurs.ServletException
- when a Servlet error occurs.
-
initialize
void initialize()Initialize the server. -
setRequestMapper
Set the request mapper.- Parameters:
requestMapper
- the request mapper.
-
start
void start()Start the server. -
stop
void stop()Stop the server.
-