java.lang.Object
io.john.amiscaray.quak.core.Application
io.john.amiscaray.quak.web.application.WebApplication
Represents a web application. On startup, begins a tomcat server and registers the required servlets and filters.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordThe configuration of this web application.Nested classes/interfaces inherited from class io.john.amiscaray.quak.core.Application
Application.LifecycleState -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.catalina.startup.Tomcatprotected org.apache.catalina.ContextFields inherited from class io.john.amiscaray.quak.core.Application
args, classScanPackage, contextLoaded, hasStarted, lifecycleListeners, main -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddPathMappings(Map<RequestMapping, PathController<?, ?>> pathMappings) voidfinish()Stops the web application.static WebApplicationvoidinit(WebApplication.Configuration config) Inits the web application from a configuration.voidstart()Starts the application.voidstartUp()Begins the web application.Methods inherited from class io.john.amiscaray.quak.core.Application
await, contextLoaded, initContext, initLifecycleListeners, initProperties, on, postStart, postStop, preStart, preStop, startAsync, stop
-
Field Details
-
server
protected org.apache.catalina.startup.Tomcat server -
servletContext
protected org.apache.catalina.Context servletContext
-
-
Method Details
-
getInstance
- Returns:
- The singleton instance of the web application.
-
init
Inits the web application from a configuration.- Parameters:
config- The configuration used to start the web application.
-
start
Description copied from class:ApplicationStarts the application. In this initialization sequence, in this order, the application: calls any "pre-start" listeners, initializes the application properties, loads the application context, invokes the "context loaded" listeners, calls thestartup method, and calls the "post start" listeners.- Overrides:
startin classApplication- Throws:
Exception- any exceptions from this method will be thrown.
-
startUp
Begins the web application.- Specified by:
startUpin classApplication- Throws:
Exception- Throws any exception.
-
finish
public void finish() throws org.apache.catalina.LifecycleExceptionStops the web application.- Specified by:
finishin classApplication- Throws:
org.apache.catalina.LifecycleException- If there was a problem ending the application.
-
addPathMappings
-