|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.boot.context.embedded.AbstractEmbeddedServletContainerFactory
org.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainerFactory
public class JettyEmbeddedServletContainerFactory
EmbeddedServletContainerFactory that can be used to create
JettyEmbeddedServletContainers. Can be initialized using Spring's
ServletContextInitializers or Jetty Configurations.
Unless explicitly configured otherwise this factory will created containers that listens for HTTP requests on port 8080.
AbstractEmbeddedServletContainerFactory.setPort(int),
setConfigurations(Collection),
JettyEmbeddedServletContainer| Field Summary |
|---|
| Fields inherited from class org.springframework.boot.context.embedded.AbstractEmbeddedServletContainerFactory |
|---|
logger |
| Constructor Summary | |
|---|---|
JettyEmbeddedServletContainerFactory()
Create a new JettyEmbeddedServletContainerFactory instance. |
|
JettyEmbeddedServletContainerFactory(int port)
Create a new JettyEmbeddedServletContainerFactory that listens for requests
using the specified port. |
|
JettyEmbeddedServletContainerFactory(String contextPath,
int port)
Create a new JettyEmbeddedServletContainerFactory with the specified
context path and port. |
|
| Method Summary | |
|---|---|
void |
addConfigurations(org.eclipse.jetty.webapp.Configuration... configurations)
Add Configurations that will be applied to the WebAppContext before
the server is started. |
Collection<org.eclipse.jetty.webapp.Configuration> |
getConfigurations()
Returns a mutable collection of Jetty Configurations that will be applied
to the WebAppContext before the server is created. |
EmbeddedServletContainer |
getEmbeddedServletContainer(ServletContextInitializer... initializers)
Gets a new fully configured but paused EmbeddedServletContainer instance. |
protected JettyEmbeddedServletContainer |
getJettyEmbeddedServletContainer(org.eclipse.jetty.server.Server server)
Factory method called to create the JettyEmbeddedServletContainer. |
protected org.eclipse.jetty.webapp.Configuration |
getServletContextInitializerConfiguration(org.eclipse.jetty.webapp.WebAppContext webAppContext,
ServletContextInitializer... initializers)
Return a Jetty Configuration that will invoke the specified
ServletContextInitializers. |
protected org.eclipse.jetty.webapp.Configuration[] |
getWebAppContextConfigurations(org.eclipse.jetty.webapp.WebAppContext webAppContext,
ServletContextInitializer... initializers)
Return the Jetty Configurations that should be applied to the server. |
protected void |
postProcessWebAppContext(org.eclipse.jetty.webapp.WebAppContext webAppContext)
Post process the Jetty WebAppContext before it used with the Jetty Server. |
void |
setConfigurations(Collection<? extends org.eclipse.jetty.webapp.Configuration> configurations)
Sets Jetty Configurations that will be applied to the WebAppContext
before the server is created. |
void |
setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
|
| Methods inherited from class org.springframework.boot.context.embedded.AbstractEmbeddedServletContainerFactory |
|---|
addErrorPages, addInitializers, getAddress, getContextPath, getDocumentRoot, getErrorPages, getInitializers, getJspServletClassName, getMimeMappings, getPort, getSessionTimeout, getValidDocumentRoot, isRegisterDefaultServlet, isRegisterJspServlet, mergeInitializers, setAddress, setContextPath, setDocumentRoot, setErrorPages, setInitializers, setJspServletClassName, setMimeMappings, setPort, setRegisterDefaultServlet, setRegisterJspServlet, setSessionTimeout, setSessionTimeout |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JettyEmbeddedServletContainerFactory()
JettyEmbeddedServletContainerFactory instance.
public JettyEmbeddedServletContainerFactory(int port)
JettyEmbeddedServletContainerFactory that listens for requests
using the specified port.
port - the port to listen on
public JettyEmbeddedServletContainerFactory(String contextPath,
int port)
JettyEmbeddedServletContainerFactory with the specified
context path and port.
contextPath - root the context pathport - the port to listen on| Method Detail |
|---|
public EmbeddedServletContainer getEmbeddedServletContainer(ServletContextInitializer... initializers)
EmbeddedServletContainerFactoryEmbeddedServletContainer instance.
Clients should not be able to connect to the returned server until
EmbeddedServletContainer.start() is called (which happens when the
ApplicationContext has been fully refreshed).
getEmbeddedServletContainer in interface EmbeddedServletContainerFactoryinitializers - ServletContextInitializers that should be applied as
the container starts
EmbeddedServletContainerEmbeddedServletContainer.stop()
protected org.eclipse.jetty.webapp.Configuration[] getWebAppContextConfigurations(org.eclipse.jetty.webapp.WebAppContext webAppContext,
ServletContextInitializer... initializers)
Configurations that should be applied to the server.
webAppContext - the Jetty WebAppContextinitializers - the ServletContextInitializers to apply
protected org.eclipse.jetty.webapp.Configuration getServletContextInitializerConfiguration(org.eclipse.jetty.webapp.WebAppContext webAppContext,
ServletContextInitializer... initializers)
Configuration that will invoke the specified
ServletContextInitializers. By default this method will return a
ServletContextInitializerConfiguration.
webAppContext - the Jetty WebAppContextinitializers - the ServletContextInitializers to apply
Configuration instanceprotected void postProcessWebAppContext(org.eclipse.jetty.webapp.WebAppContext webAppContext)
WebAppContext before it used with the Jetty Server.
Subclasses can override this method to apply additional processing to the
WebAppContext.
webAppContext - the Jetty WebAppContextprotected JettyEmbeddedServletContainer getJettyEmbeddedServletContainer(org.eclipse.jetty.server.Server server)
JettyEmbeddedServletContainer.
Subclasses can override this method to return a different
JettyEmbeddedServletContainer or apply additional processing to the Jetty
server.
server - the Jetty server.
JettyEmbeddedServletContainer instancepublic void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
setResourceLoader in interface org.springframework.context.ResourceLoaderAwarepublic void setConfigurations(Collection<? extends org.eclipse.jetty.webapp.Configuration> configurations)
Configurations that will be applied to the WebAppContext
before the server is created. Calling this method will replace any existing
configurations.
configurations - the Jetty configurations to applypublic Collection<org.eclipse.jetty.webapp.Configuration> getConfigurations()
Configurations that will be applied
to the WebAppContext before the server is created.
Configurationspublic void addConfigurations(org.eclipse.jetty.webapp.Configuration... configurations)
Configurations that will be applied to the WebAppContext before
the server is started.
configurations - the configurations to add
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||