Package org.nuxeo.runtime.server.tomcat
Class TomcatServerConfigurator
java.lang.Object
org.nuxeo.runtime.server.tomcat.TomcatServerConfigurator
- All Implemented Interfaces:
ServerConfigurator
Configurator for an embedded Tomcat server.
- Since:
- 10.2
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.
-
Field Details
-
tomcat
protected org.apache.catalina.startup.Tomcat tomcat
-
-
Constructor Details
-
TomcatServerConfigurator
public TomcatServerConfigurator()
-
-
Method Details
-
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
Description copied from interface:ServerConfigurator
Adds a web app to the server.- Specified by:
addWepApp
in interfaceServerConfigurator
- Parameters:
descriptor
- the descriptor
-
addFilter
Description copied from interface:ServerConfigurator
Adds a filter to the server.- Specified by:
addFilter
in interfaceServerConfigurator
- Parameters:
descriptor
- the descriptor
-
addServlet
Description copied from interface:ServerConfigurator
Adds a servlet to the server.- Specified by:
addServlet
in interfaceServerConfigurator
- Parameters:
descriptor
- the descriptor
-
addLifecycleListener
Description copied from interface:ServerConfigurator
Adds a lifecycle listener to the server.- Specified by:
addLifecycleListener
in interfaceServerConfigurator
- Parameters:
descriptor
- the descriptor
-
getContextForPath
-
normalizeContextPath
-