Package org.nuxeo.runtime.server.tomcat
Class TomcatServerConfigurator
- java.lang.Object
-
- org.nuxeo.runtime.server.tomcat.TomcatServerConfigurator
-
- All Implemented Interfaces:
ServerConfigurator
public class TomcatServerConfigurator extends Object implements ServerConfigurator
Configurator for an embedded Tomcat server.- Since:
- 10.2
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.catalina.startup.Tomcattomcat
-
Constructor Summary
Constructors Constructor Description TomcatServerConfigurator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFilter(FilterDescriptor descriptor)Adds a filter to the server.voidaddLifecycleListener(ServletContextListenerDescriptor descriptor)Adds a lifecycle listener to the server.voidaddServlet(ServletDescriptor descriptor)Adds a servlet to the server.voidaddWepApp(WebApplication descriptor)Adds a web app to the server.voidclose()Closes this server configurator and releases resources.protected org.apache.catalina.ContextgetContextForPath(String contextPath)intinitialize(int port)Initializes this server configuratorprotected StringnormalizeContextPath(String contextPath)voidstart()Starts the server.voidstop()Stops the server.
-
-
-
Method Detail
-
initialize
public int initialize(int port)
Description copied from interface:ServerConfiguratorInitializes this server configurator- Specified by:
initializein interfaceServerConfigurator- Parameters:
port- the HTTP port to use- Returns:
- the actual port used
-
close
public void close()
Description copied from interface:ServerConfiguratorCloses this server configurator and releases resources.- Specified by:
closein interfaceServerConfigurator
-
start
public void start()
Description copied from interface:ServerConfiguratorStarts the server.- Specified by:
startin interfaceServerConfigurator
-
stop
public void stop()
Description copied from interface:ServerConfiguratorStops the server.- Specified by:
stopin interfaceServerConfigurator
-
addWepApp
public void addWepApp(WebApplication descriptor)
Description copied from interface:ServerConfiguratorAdds a web app to the server.- Specified by:
addWepAppin interfaceServerConfigurator- Parameters:
descriptor- the descriptor
-
addFilter
public void addFilter(FilterDescriptor descriptor)
Description copied from interface:ServerConfiguratorAdds a filter to the server.- Specified by:
addFilterin interfaceServerConfigurator- Parameters:
descriptor- the descriptor
-
addServlet
public void addServlet(ServletDescriptor descriptor)
Description copied from interface:ServerConfiguratorAdds a servlet to the server.- Specified by:
addServletin interfaceServerConfigurator- Parameters:
descriptor- the descriptor
-
addLifecycleListener
public void addLifecycleListener(ServletContextListenerDescriptor descriptor)
Description copied from interface:ServerConfiguratorAdds a lifecycle listener to the server.- Specified by:
addLifecycleListenerin interfaceServerConfigurator- Parameters:
descriptor- the descriptor
-
getContextForPath
protected org.apache.catalina.Context getContextForPath(String contextPath)
-
-