public class TomcatEmbeddedServletContainer extends Object implements EmbeddedServletContainer
EmbeddedServletContainer
that can be used to control an embedded Tomcat server.
Usually this class should be created using the
TomcatEmbeddedServletContainerFactory
and not directly.TomcatEmbeddedServletContainerFactory
Constructor and Description |
---|
TomcatEmbeddedServletContainer(Tomcat tomcat)
Create a new
TomcatEmbeddedServletContainer instance. |
TomcatEmbeddedServletContainer(Tomcat tomcat,
boolean autoStart)
Create a new
TomcatEmbeddedServletContainer instance. |
public TomcatEmbeddedServletContainer(Tomcat tomcat)
TomcatEmbeddedServletContainer
instance.tomcat
- the underlying Tomcat serverpublic TomcatEmbeddedServletContainer(Tomcat tomcat, boolean autoStart)
TomcatEmbeddedServletContainer
instance.tomcat
- the underlying Tomcat serverautoStart
- if the server should be startedpublic void start() throws EmbeddedServletContainerException
EmbeddedServletContainer
start
in interface EmbeddedServletContainer
EmbeddedServletContainerException
- of the container cannot be stoppedpublic void stop() throws EmbeddedServletContainerException
EmbeddedServletContainer
stop
in interface EmbeddedServletContainer
EmbeddedServletContainerException
- of the container cannot be stoppedpublic int getPort()
getPort
in interface EmbeddedServletContainer
public Tomcat getTomcat()
Copyright © 2014 Pivotal Software, Inc.. All rights reserved.