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.Tomcat
tomcat
-
Constructor Summary
Constructors Constructor Description TomcatServerConfigurator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFilter(FilterDescriptor descriptor)
Adds a filter to the server.void
addLifecycleListener(ServletContextListenerDescriptor descriptor)
Adds a lifecycle listener to the server.void
addServlet(ServletDescriptor descriptor)
Adds a servlet to the server.void
addWepApp(WebApplication descriptor)
Adds a web app to the server.void
close()
Closes this server configurator and releases resources.protected org.apache.catalina.Context
getContextForPath(String contextPath)
int
initialize(int port)
Initializes this server configuratorprotected String
normalizeContextPath(String contextPath)
void
start()
Starts the server.void
stop()
Stops the server.
-
-
-
Method Detail
-
initialize
public int initialize(int port)
Description copied from interface:ServerConfigurator
Initializes this server configurator- Specified by:
initialize
in interfaceServerConfigurator
- Parameters:
port
- the HTTP port to use- Returns:
- the actual port used
-
close
public void close()
Description copied from interface:ServerConfigurator
Closes this server configurator and releases resources.- Specified by:
close
in interfaceServerConfigurator
-
start
public void start()
Description copied from interface:ServerConfigurator
Starts the server.- Specified by:
start
in interfaceServerConfigurator
-
stop
public void stop()
Description copied from interface:ServerConfigurator
Stops the server.- Specified by:
stop
in interfaceServerConfigurator
-
addWepApp
public void addWepApp(WebApplication descriptor)
Description copied from interface:ServerConfigurator
Adds a web app to the server.- Specified by:
addWepApp
in interfaceServerConfigurator
- Parameters:
descriptor
- the descriptor
-
addFilter
public void addFilter(FilterDescriptor descriptor)
Description copied from interface:ServerConfigurator
Adds a filter to the server.- Specified by:
addFilter
in interfaceServerConfigurator
- Parameters:
descriptor
- the descriptor
-
addServlet
public void addServlet(ServletDescriptor descriptor)
Description copied from interface:ServerConfigurator
Adds a servlet to the server.- Specified by:
addServlet
in interfaceServerConfigurator
- Parameters:
descriptor
- the descriptor
-
addLifecycleListener
public void addLifecycleListener(ServletContextListenerDescriptor descriptor)
Description copied from interface:ServerConfigurator
Adds a lifecycle listener to the server.- Specified by:
addLifecycleListener
in interfaceServerConfigurator
- Parameters:
descriptor
- the descriptor
-
getContextForPath
protected org.apache.catalina.Context getContextForPath(String contextPath)
-
-