Class WebApplication

java.lang.Object
io.john.amiscaray.quak.core.Application
io.john.amiscaray.quak.web.application.WebApplication

public class WebApplication extends Application
Represents a web application. On startup, begins a tomcat server and registers the required servlets and filters.
  • Field Details

    • server

      protected org.apache.catalina.startup.Tomcat server
    • servletContext

      protected org.apache.catalina.Context servletContext
  • Method Details

    • getInstance

      public static WebApplication getInstance()
      Returns:
      The singleton instance of the web application.
    • init

      public void init(WebApplication.Configuration config)
      Inits the web application from a configuration.
      Parameters:
      config - The configuration used to start the web application.
    • start

      public void start() throws Exception
      Description copied from class: Application
      Starts 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 the startup method, and calls the "post start" listeners.
      Overrides:
      start in class Application
      Throws:
      Exception - any exceptions from this method will be thrown.
    • startUp

      public void startUp() throws Exception
      Begins the web application.
      Specified by:
      startUp in class Application
      Throws:
      Exception - Throws any exception.
    • finish

      public void finish() throws org.apache.catalina.LifecycleException
      Stops the web application.
      Specified by:
      finish in class Application
      Throws:
      org.apache.catalina.LifecycleException - If there was a problem ending the application.
    • addPathMappings

      protected void addPathMappings(Map<RequestMapping,PathController<?,?>> pathMappings)