Interface ServletWebServerFactory

All Known Implementing Classes:
TomcatServletWebServerFactory

public interface ServletWebServerFactory
A factory interface for creating and configuring servlet-based web servers. Implementations of this interface provide methods to create a WebServer instance and obtain information about the server's context and context path.

This interface is designed to be implemented by classes that create and configure embedded servlet containers, such as Apache Tomcat.

Since:
1.0
Author:
Blyzhnytsia Team
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.catalina.Context
    Returns the Context associated with the servlet-based web server.
    Returns the context path for the servlet-based web server.
    Creates and returns a new instance of a servlet-based WebServer.
    void
    setTomcatAppLifecycleListener(org.apache.catalina.LifecycleListener tomcatAppLifecycleListener)
     
  • Method Details

    • getWebServer

      WebServer getWebServer()
      Creates and returns a new instance of a servlet-based WebServer.
      Returns:
      a configured instance of WebServer
      See Also:
    • getContext

      org.apache.catalina.Context getContext()
      Returns the Context associated with the servlet-based web server.
      Returns:
      the server's Context
      See Also:
      • Context
    • getContextPath

      String getContextPath()
      Returns the context path for the servlet-based web server.
      Returns:
      the context path
    • setTomcatAppLifecycleListener

      void setTomcatAppLifecycleListener(org.apache.catalina.LifecycleListener tomcatAppLifecycleListener)