Class CatalinaWebAppContext

java.lang.Object
org.gatein.wci.spi.CatalinaWebAppContext
All Implemented Interfaces:
WebAppContext

public abstract class CatalinaWebAppContext extends Object implements WebAppContext
Author:
Ken Finnigan
  • Field Details

    • log

      protected static final org.slf4j.Logger log
    • GATEIN_SERVLET_NAME

      protected static final String GATEIN_SERVLET_NAME
      See Also:
    • GATEIN_SERVLET_PATH

      protected static final String GATEIN_SERVLET_PATH
      See Also:
    • GATEIN_SERVLET_LOAD_ON_STARTUP

      protected static final int GATEIN_SERVLET_LOAD_ON_STARTUP
      See Also:
    • servletContext

      protected jakarta.servlet.ServletContext servletContext
      .
    • classLoader

      protected ClassLoader classLoader
      .
    • contextPath

      protected String contextPath
      .
  • Constructor Details

    • CatalinaWebAppContext

      public CatalinaWebAppContext(jakarta.servlet.ServletContext servletContext, ClassLoader classLoader, String contextPath)
  • Method Details

    • start

      public void start() throws Exception
      Description copied from interface: WebAppContext
      Start the web application context usage from a client point of view. The life cycle is not related to the web application deployment life cycle. The invocation means that the servlet container spi framework want to start to use the web application.
      Specified by:
      start in interface WebAppContext
      Throws:
      Exception - any exception that would veto the usage of the web application
    • stop

      public void stop()
      Description copied from interface: WebAppContext
      Stop the web application context usage.
      Specified by:
      stop in interface WebAppContext
    • getServletContext

      public jakarta.servlet.ServletContext getServletContext()
      Description copied from interface: WebAppContext
      Returns the servlet context of the web application.
      Specified by:
      getServletContext in interface WebAppContext
      Returns:
      the servlet context
    • getClassLoader

      public ClassLoader getClassLoader()
      Description copied from interface: WebAppContext
      Returns the class loader of the web application.
      Specified by:
      getClassLoader in interface WebAppContext
      Returns:
      the web application class loader
    • getContextPath

      public String getContextPath()
      Description copied from interface: WebAppContext
      Returns the context path of the web application.
      Specified by:
      getContextPath in interface WebAppContext
      Returns:
      the web application context path
    • importFile

      public boolean importFile(String parentDirRelativePath, String name, InputStream source, boolean overwrite) throws IOException
      Description copied from interface: WebAppContext
      Import a file in the war file. The file could not be created for some reasons which are :
      • The parent dir exists and is a file
      • The parent dir does not exist and its creation failed
      • An underlying exception occurs when writing bytes from the source Inputstream to the target OutputStream
      Specified by:
      importFile in interface WebAppContext
      Parameters:
      parentDirRelativePath - the parent relative path in the web app starting from the app root
      name - the name the created file should have
      source - the data of the target file
      overwrite - if false and the file already exists nothing is done
      Returns:
      true if the file has been created
      Throws:
      IOException - if the file cannot be created
    • getCommandServletClassName

      protected String getCommandServletClassName()
    • fireRequestDestroyed

      public void fireRequestDestroyed(jakarta.servlet.ServletRequest servletRequest)
      Specified by:
      fireRequestDestroyed in interface WebAppContext
    • fireRequestInitialized

      public void fireRequestInitialized(jakarta.servlet.ServletRequest servletRequest)
      Specified by:
      fireRequestInitialized in interface WebAppContext
    • performStartup

      protected abstract void performStartup() throws Exception
      Throws:
      Exception
    • cleanup

      protected abstract void cleanup()