Class BasicTomcatServerFactory
java.lang.Object
org.apache.juneau.microservice.tomcat.BasicTomcatServerFactory
- All Implemented Interfaces:
TomcatServerFactory
Basic implementation of a Tomcat server factory.
Builds a programmatic Tomcat instance with the supplied Catalina base directory and a single root
context mounted at TomcatServerComponent).
See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
BasicTomcatServerFactory
public BasicTomcatServerFactory()Constructor.
-
-
Method Details
-
create
Description copied from interface:TomcatServerFactoryCreate a new initialized embedded Tomcat server.The returned server is configured with the specified Catalina base directory and a root context (mounted at
"" ) but is not yet started and has no connector port assigned — theTomcatServerComponentassigns the port and materializes the connector before callingTomcat.start().- Specified by:
createin interfaceTomcatServerFactory- Parameters:
baseDir- The writable Catalina base / work directory to use for this server.- Returns:
- A newly-created but not-yet-started Tomcat server.
- Throws:
Exception- Any exception.
-