@ -57,7 +57,7 @@ import org.springframework.web.context.support.WebApplicationContextUtils;
* A { @link WebApplicationContext } that can be used to bootstrap itself from a contained
* { @link EmbeddedServletContainerFactory } bean .
* < p >
* This context will create , initialize and run an { @link Embedded ServletContain er} by
* This context will create , initialize and run an { @link Embedded Web Server} by
* searching for a single { @link EmbeddedServletContainerFactory } bean within the
* { @link ApplicationContext } itself . The { @link EmbeddedServletContainerFactory } is free
* to use standard Spring concepts ( such as dependency injection , lifecycle callbacks and
@ -99,7 +99,7 @@ public class EmbeddedWebApplicationContext extends GenericWebApplicationContext
* /
public static final String DISPATCHER_SERVLET_NAME = "dispatcherServlet" ;
private volatile Embedded ServletContain er embedded ServletContain er;
private volatile Embedded Web Server embedded Web Server;
private ServletConfig servletConfig ;
@ -142,7 +142,7 @@ public class EmbeddedWebApplicationContext extends GenericWebApplicationContext
@Override
protected void finishRefresh ( ) {
super . finishRefresh ( ) ;
Embedded ServletContain er localContainer = startEmbeddedServletContainer ( ) ;
Embedded Web Server localContainer = startEmbeddedServletContainer ( ) ;
if ( localContainer ! = null ) {
publishEvent (
new EmbeddedServletContainerInitializedEvent ( this , localContainer ) ) ;
@ -156,11 +156,11 @@ public class EmbeddedWebApplicationContext extends GenericWebApplicationContext
}
private void createEmbeddedServletContainer ( ) {
Embedded ServletContain er localContainer = this . embedded ServletContain er;
Embedded Web Server localContainer = this . embedded Web Server;
ServletContext localServletContext = getServletContext ( ) ;
if ( localContainer = = null & & localServletContext = = null ) {
EmbeddedServletContainerFactory containerFactory = getEmbeddedServletContainerFactory ( ) ;
this . embedded ServletContain er = containerFactory
this . embedded Web Server = containerFactory
. getEmbeddedServletContainer ( getSelfInitializer ( ) ) ;
}
else if ( localServletContext ! = null ) {
@ -291,8 +291,8 @@ public class EmbeddedWebApplicationContext extends GenericWebApplicationContext
}
}
private Embedded ServletContain er startEmbeddedServletContainer ( ) {
Embedded ServletContain er localContainer = this . embedded ServletContain er;
private Embedded Web Server startEmbeddedServletContainer ( ) {
Embedded Web Server localContainer = this . embedded Web Server;
if ( localContainer ! = null ) {
localContainer . start ( ) ;
}
@ -300,11 +300,11 @@ public class EmbeddedWebApplicationContext extends GenericWebApplicationContext
}
private void stopAndReleaseEmbeddedServletContainer ( ) {
Embedded ServletContain er localContainer = this . embedded ServletContain er;
Embedded Web Server localContainer = this . embedded Web Server;
if ( localContainer ! = null ) {
try {
localContainer . stop ( ) ;
this . embedded ServletContain er = null ;
this . embedded Web Server = null ;
}
catch ( Exception ex ) {
throw new IllegalStateException ( ex ) ;
@ -341,12 +341,12 @@ public class EmbeddedWebApplicationContext extends GenericWebApplicationContext
}
/ * *
* Returns the { @link Embedded ServletContain er} that was created by the context or
* Returns the { @link Embedded Web Server} that was created by the context or
* { @code null } if the container has not yet been created .
* @return the embedded servlet container
* /
public Embedded ServletContain er getEmbedded ServletContain er( ) {
return this . embedded ServletContain er;
public Embedded Web Server getEmbedded Web Server( ) {
return this . embedded Web Server;
}
/ * *