Package com.bobocode.bring.web.server
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 SummaryModifier and TypeMethodDescriptionorg.apache.catalina.ContextReturns theContextassociated 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-basedWebServer.voidsetTomcatAppLifecycleListener(org.apache.catalina.LifecycleListener tomcatAppLifecycleListener) 
- 
Method Details- 
getWebServerWebServer getWebServer()Creates and returns a new instance of a servlet-basedWebServer.- Returns:
- a configured instance of WebServer
- See Also:
 
- 
getContextorg.apache.catalina.Context getContext()Returns theContextassociated with the servlet-based web server.- Returns:
- the server's Context
- See Also:
 
- 
getContextPathString getContextPath()Returns the context path for the servlet-based web server.- Returns:
- the context path
 
- 
setTomcatAppLifecycleListenervoid setTomcatAppLifecycleListener(org.apache.catalina.LifecycleListener tomcatAppLifecycleListener) 
 
-