|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.enterprise.web.WebContainer
@Service(name="com.sun.enterprise.web.WebContainer") @Scoped(value=org.jvnet.hk2.component.Singleton.class) public class WebContainer
Web container service
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.glassfish.api.event.EventListener |
|---|
EventListener.Event<T> |
| Field Summary | |
|---|---|
protected int |
_debug
Controls the verbosity of the web container subsystem's debug messages. |
protected static java.util.logging.Logger |
_logger
The logger to use for logging ALL web container related messages. |
protected java.io.File |
_modulesRoot
Absolute path for location where all the deployed standalone modules are stored for this Server Instance. |
protected boolean |
_started
Has this component been started yet? |
protected boolean |
catalinaCachingAllowed
false when the Grizzly File Cache is enabled. |
protected WebConfigListener |
configListener
|
protected int |
defaultRedirectPort
The default-redirect port |
static java.lang.String |
DISPATCHER_MAX_DEPTH
|
protected java.lang.String |
globalAccessLogBufferSize
AccessLog buffer size for storing logs. |
protected boolean |
globalAccessLoggingEnabled
Allow disabling accessLog mechanism |
protected java.lang.String |
globalAccessLogWriteInterval
AccessLog interval before the valve flush its buffer to the disk. |
protected boolean |
globalSSOEnabled
The global (at the http-service level) ssoEnabled property. |
protected ServerEnvironment |
instance
|
protected JspProbeProvider |
jspProbeProvider
|
static java.lang.String |
JWS_APPCLIENT_EAR_NAME
|
static java.lang.String |
JWS_APPCLIENT_WAR_NAME
|
protected static java.util.ResourceBundle |
rb
|
protected RequestProbeProvider |
requestProbeProvider
|
protected ServletProbeProvider |
servletProbeProvider
|
protected SessionProbeProvider |
sessionProbeProvider
|
protected static boolean |
useDOLforDeployment
Are we using Tomcat deployment backend or DOL? |
protected static WebContainer |
webContainer
The current WebContainer instance used (single). |
protected WebContainerFeatureFactory |
webContainerFeatureFactory
|
protected WebModuleProbeProvider |
webModuleProbeProvider
|
| Constructor Summary | |
|---|---|
WebContainer()
|
|
| Method Summary | ||
|---|---|---|
WebConnector |
addConnector(com.sun.grizzly.config.dom.NetworkListener httpListener,
HttpService httpService,
boolean start)
|
|
protected void |
configureHost(VirtualServer vs,
SecurityService securityService)
Configures the given virtual server. |
|
protected void |
configureHostPortNumbers(VirtualServer vs,
java.util.HashSet<com.sun.grizzly.config.dom.NetworkListener> listeners)
Configures the given virtual server with the port numbers of its associated http listeners. |
|
void |
configureHttpServiceProperties(HttpService httpService,
PECoyoteConnector connector)
Deprecated. most of these properties are handled elsewhere. validate and remove outdated properties checks |
|
VirtualServer |
createHost(java.lang.String vsID,
VirtualServer vsBean,
java.lang.String docroot,
MimeMap mimeMap)
Create a virtual server/host. |
|
VirtualServer |
createHost(VirtualServer vsBean,
HttpService httpService,
SecurityService securityService)
Creates a Host from a virtual-server config bean. |
|
protected void |
createHosts(HttpService httpService,
SecurityService securityService)
Enumerates the virtual-server subelements of the given http-service element, and creates a corresponding Host for each. |
|
protected WebConnector |
createHttpListener(com.sun.grizzly.config.dom.NetworkListener listener,
HttpService httpService)
Use an network-listener subelements and creates a corresponding Tomcat Connector for each. |
|
protected WebConnector |
createHttpListener(com.sun.grizzly.config.dom.NetworkListener listener,
HttpService httpService,
com.sun.grizzly.util.http.mapper.Mapper mapper)
|
|
protected WebConnector |
createJKConnector(com.sun.grizzly.config.dom.NetworkListener listener,
HttpService httpService)
Starts the AJP connector that will listen to call from Apache using mod_jk, mod_jk2 or mod_ajp. |
|
|
createTagHandlerInstance(WebModule module,
java.lang.Class<T> clazz)
Instantiates and injects the given tag handler class for the given WebModule |
|
void |
deleteConnector(com.sun.grizzly.config.dom.NetworkListener httpListener)
Stops and deletes the specified http listener. |
|
void |
deleteConnector(WebConnector connector)
Stops and deletes the specified http listener. |
|
void |
deleteHost(HttpService httpService)
Delete virtual-server. |
|
void |
event(EventListener.Event event)
|
|
LifecycleListener[] |
findLifecycleListeners()
Get the lifecycle listeners associated with this lifecycle. |
|
java.lang.String |
getApplicationId(WebModule wm)
The application id for this web module HERCULES:add |
|
java.util.HashMap<java.lang.String,WebConnector> |
getConnectorMap()
|
|
java.lang.Class<? extends WebDeployer> |
getDeployer()
|
|
Engine |
getEngine()
Return the parent/top-level container in _embedded for virtual servers. |
|
WebConnector |
getJkConnector()
|
|
JspProbeProvider |
getJspProbeProvider()
Gets the probe provider for jsp related events. |
|
java.io.File |
getModulesRoot()
Return the Absolute path for location where all the deployed standalone modules are stored for this Server Instance. |
|
java.lang.String |
getName()
|
|
RequestProbeProvider |
getRequestProbeProvider()
Gets the probe provider for request/response related events. |
|
ServerContext |
getServerContext()
Utility Method to access the ServerContext |
|
ServletProbeProvider |
getServletProbeProvider()
Gets the probe provider for servlet related events. |
|
SessionProbeProvider |
getSessionProbeProvider()
Gets the probe provider for session related events. |
|
WebModuleProbeProvider |
getWebModuleProbeProvider()
Gets the probe provider for web module related events. |
|
protected boolean |
isEnabled(java.lang.String moduleName)
Whether or not a component (either an application or a module) should be enabled is defined by the "enable" attribute on both the application/module element and the application-ref element. |
|
boolean |
isShutdown()
|
|
protected boolean |
isTomcatUsingDefaultDomain()
is Tomcat using default domain name as its domain |
|
java.lang.Class |
loadCommonClass(java.lang.String className)
|
|
void |
loadDefaultWebModule(VirtualServer vsBean)
Load a default-web-module on the specified virtual server. |
|
void |
loadDefaultWebModule(VirtualServer vs)
Load a default-web-module on the specified virtual server. |
|
void |
loadDefaultWebModulesAfterAllAppsProcessed()
Configures a default web module for each virtual server if default-web-module is defined. |
|
protected void |
loadStandaloneWebModule(VirtualServer vs,
WebModuleConfig wmInfo)
Load the specified web module as a standalone module on the specified virtual server. |
|
void |
loadSystemDefaultWebModules()
Configures a default web module for each virtual server based on the virtual server's docroot if a virtual server does not specify any default-web-module, and none of its web modules are loaded at "/" Needed in postConstruct before Deployment.ALL_APPLICATIONS_PROCESSED for "jsp from docroot before web container start" scenario |
|
java.util.List<Result<WebModule>> |
loadWebModule(WebModuleConfig wmInfo,
java.lang.String j2eeApplication,
java.util.Properties deploymentProperties)
Creates and configures a web module for each virtual server that the web module is hosted under. |
|
void |
postConstruct()
|
|
void |
preDestroy()
|
|
void |
registerAdHocPath(java.lang.String path,
java.lang.String ctxtRoot,
java.lang.String appName,
AdHocServletInfo servletInfo)
Registers the given ad-hoc path at the given context root. |
|
void |
registerAdHocPathAndSubtree(java.lang.String path,
java.lang.String subtree,
java.lang.String ctxtRoot,
java.lang.String appName,
AdHocServletInfo servletInfo)
Registers the given ad-hoc path and subtree at the given context root. |
|
void |
stop()
Gracefully terminate the active use of the public methods of this component. |
|
boolean |
suspendWebModule(java.lang.String contextRoot,
java.lang.String appName,
java.lang.String hosts)
Suspends the web application with the given appName that has been deployed at the given contextRoot on the given virtual servers. |
|
void |
unloadWebModule(java.lang.String contextRoot,
java.lang.String appName,
java.lang.String virtualServers,
boolean dummy,
java.util.Properties props)
Undeploy a web application. |
|
void |
unloadWebModule(java.lang.String contextRoot,
java.lang.String appName,
java.lang.String virtualServers,
java.util.Properties props)
Undeploy a web application. |
|
void |
unregisterAdHocPath(java.lang.String path,
java.lang.String ctxtRoot)
Unregisters the given ad-hoc path from the given context root. |
|
void |
unregisterAdHocPathAndSubtree(java.lang.String path,
java.lang.String subtree,
java.lang.String ctxtRoot)
Unregisters the given ad-hoc path and subtree from the given context root. |
|
void |
updateAccessLog(HttpService httpService)
Reconfigures the access log valve of each virtual server with the updated attributes of the |
|
void |
updateConnector(com.sun.grizzly.config.dom.NetworkListener networkListener,
HttpService httpService)
Update an network-listener |
|
void |
updateConnectorProperty(com.sun.grizzly.config.dom.NetworkListener listener,
java.lang.String propName,
java.lang.String propValue)
Update an http-listener property |
|
protected void |
updateDefaultWebModule(VirtualServer virtualServer,
java.lang.String[] listenerNames,
WebModuleConfig wmInfo)
|
|
void |
updateHost(VirtualServer vsBean)
Updates a virtual-server element. |
|
void |
updateHostProperties(VirtualServer vsBean,
java.lang.String name,
java.lang.String value,
SecurityService securityService,
VirtualServer vs)
Update virtual-server properties. |
|
void |
updateHttpService(HttpService httpService)
Processes an update to the http-service element |
|
void |
updateMapper(HttpService httpService,
com.sun.grizzly.config.dom.NetworkListener httpListener,
com.sun.grizzly.util.http.mapper.Mapper mapper)
Method gets called, when GrizzlyService changes HTTP Mapper, associated with specific port. |
|
protected void |
validateDocroot(java.lang.String docroot,
java.lang.String vs_id,
java.lang.String defaultWebModule)
Validate the docroot properties of a virtual-server. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DISPATCHER_MAX_DEPTH
public static final java.lang.String JWS_APPCLIENT_EAR_NAME
public static final java.lang.String JWS_APPCLIENT_WAR_NAME
protected static final java.util.logging.Logger _logger
protected static final java.util.ResourceBundle rb
protected static WebContainer webContainer
WebContainer instance used (single).
protected static boolean useDOLforDeployment
protected boolean globalAccessLoggingEnabled
protected java.lang.String globalAccessLogBufferSize
protected java.lang.String globalAccessLogWriteInterval
protected int defaultRedirectPort
protected boolean catalinaCachingAllowed
protected ServerEnvironment instance
protected int _debug
protected java.io.File _modulesRoot
protected boolean _started
protected boolean globalSSOEnabled
protected volatile WebContainerFeatureFactory webContainerFeatureFactory
protected JspProbeProvider jspProbeProvider
protected RequestProbeProvider requestProbeProvider
protected ServletProbeProvider servletProbeProvider
protected SessionProbeProvider sessionProbeProvider
protected WebModuleProbeProvider webModuleProbeProvider
protected WebConfigListener configListener
| Constructor Detail |
|---|
public WebContainer()
| Method Detail |
|---|
public void postConstruct()
postConstruct in interface org.jvnet.hk2.component.PostConstructpublic void event(EventListener.Event event)
event in interface EventListenerpublic void preDestroy()
preDestroy in interface org.jvnet.hk2.component.PreDestroypublic boolean isShutdown()
public ServletProbeProvider getServletProbeProvider()
public JspProbeProvider getJspProbeProvider()
public SessionProbeProvider getSessionProbeProvider()
public RequestProbeProvider getRequestProbeProvider()
public WebModuleProbeProvider getWebModuleProbeProvider()
public java.lang.String getName()
getName in interface Containerpublic java.lang.Class<? extends WebDeployer> getDeployer()
getDeployer in interface Containerpublic WebConnector getJkConnector()
public java.util.HashMap<java.lang.String,WebConnector> getConnectorMap()
public <T extends javax.servlet.jsp.tagext.JspTag> T createTagHandlerInstance(WebModule module,
java.lang.Class<T> clazz)
throws java.lang.Exception
java.lang.Exception
protected WebConnector createHttpListener(com.sun.grizzly.config.dom.NetworkListener listener,
HttpService httpService)
httpService - The http-service elementlistener - the configuration element.
protected WebConnector createHttpListener(com.sun.grizzly.config.dom.NetworkListener listener,
HttpService httpService,
com.sun.grizzly.util.http.mapper.Mapper mapper)
protected WebConnector createJKConnector(com.sun.grizzly.config.dom.NetworkListener listener,
HttpService httpService)
public void configureHttpServiceProperties(HttpService httpService,
PECoyoteConnector connector)
protected void createHosts(HttpService httpService,
SecurityService securityService)
httpService - The http-service elementsecurityService - The security-service element
public VirtualServer createHost(VirtualServer vsBean,
HttpService httpService,
SecurityService securityService)
vsBean - The virtual-server configuration beanhttpService - The http-service element.securityService - The security-service element
protected void validateDocroot(java.lang.String docroot,
java.lang.String vs_id,
java.lang.String defaultWebModule)
protected void configureHost(VirtualServer vs,
SecurityService securityService)
vs - The virtual server to be configuredsecurityService - The security-service element
protected void configureHostPortNumbers(VirtualServer vs,
java.util.HashSet<com.sun.grizzly.config.dom.NetworkListener> listeners)
vs - The virtual server to configurelisteners - The http listeners with which the given virtual
server is associated
public VirtualServer createHost(java.lang.String vsID,
VirtualServer vsBean,
java.lang.String docroot,
MimeMap mimeMap)
public void stop()
throws LifecycleException
java.lang.IllegalStateException - if this component has not been started
LifecycleException - if this component detects a fatal error
that needs to be reportedpublic void loadSystemDefaultWebModules()
public void loadDefaultWebModulesAfterAllAppsProcessed()
public void loadDefaultWebModule(VirtualServer vsBean)
public void loadDefaultWebModule(VirtualServer vs)
protected void loadStandaloneWebModule(VirtualServer vs,
WebModuleConfig wmInfo)
protected boolean isEnabled(java.lang.String moduleName)
moduleName - The name of the component (application or module)
public java.util.List<Result<WebModule>> loadWebModule(WebModuleConfig wmInfo,
java.lang.String j2eeApplication,
java.util.Properties deploymentProperties)
protected void updateDefaultWebModule(VirtualServer virtualServer,
java.lang.String[] listenerNames,
WebModuleConfig wmInfo)
throws LifecycleException
LifecycleExceptionpublic ServerContext getServerContext()
public java.lang.String getApplicationId(WebModule wm)
public java.io.File getModulesRoot()
public void unloadWebModule(java.lang.String contextRoot,
java.lang.String appName,
java.lang.String virtualServers,
java.util.Properties props)
contextRoot - the context's name to undeployappName - the J2EE appname used at deployment timevirtualServers - List of current virtual-server object.
public void unloadWebModule(java.lang.String contextRoot,
java.lang.String appName,
java.lang.String virtualServers,
boolean dummy,
java.util.Properties props)
contextRoot - the context's name to undeployappName - the J2EE appname used at deployment timevirtualServers - List of current virtual-server object.dummy - true if the web module to be undeployed is a dummy web
module, that is, a web module created off of a virtual server's
docroot
public boolean suspendWebModule(java.lang.String contextRoot,
java.lang.String appName,
java.lang.String hosts)
contextRoot - the context rootappName - the J2EE appname used at deployment timehosts - the list of virtual serverspublic LifecycleListener[] findLifecycleListeners()
public Engine getEngine()
public void registerAdHocPath(java.lang.String path,
java.lang.String ctxtRoot,
java.lang.String appName,
AdHocServletInfo servletInfo)
path - The ad-hoc path to registerctxtRoot - The context root at which to registerappName - The name of the application with which the ad-hoc path is
associatedservletInfo - Info about the ad-hoc servlet that will service
requests on the given path
public void registerAdHocPathAndSubtree(java.lang.String path,
java.lang.String subtree,
java.lang.String ctxtRoot,
java.lang.String appName,
AdHocServletInfo servletInfo)
path - The ad-hoc path to registersubtree - The ad-hoc subtree path to registerctxtRoot - The context root at which to registerappName - The name of the application with which the ad-hoc path
and subtree are associatedservletInfo - Info about the ad-hoc servlet that will service
requests on the given ad-hoc path and subtree
public void unregisterAdHocPath(java.lang.String path,
java.lang.String ctxtRoot)
path - The ad-hoc path to unregisterctxtRoot - The context root from which to unregister
public void unregisterAdHocPathAndSubtree(java.lang.String path,
java.lang.String subtree,
java.lang.String ctxtRoot)
path - The ad-hoc path to unregistersubtree - The ad-hoc subtree to unregisterctxtRoot - The context root from which to unregister
public void deleteHost(HttpService httpService)
throws LifecycleException
httpService - element which contains the configuration info.
LifecycleException
public void updateHost(VirtualServer vsBean)
throws LifecycleException
vsBean - the virtual-server config bean.
LifecycleException
public void updateHostProperties(VirtualServer vsBean,
java.lang.String name,
java.lang.String value,
SecurityService securityService,
VirtualServer vs)
public void updateHttpService(HttpService httpService)
throws LifecycleException
LifecycleException
public void updateConnectorProperty(com.sun.grizzly.config.dom.NetworkListener listener,
java.lang.String propName,
java.lang.String propValue)
throws LifecycleException
listener - the configuration bean.propName - the property namepropValue - the property value
LifecycleException
public void updateConnector(com.sun.grizzly.config.dom.NetworkListener networkListener,
HttpService httpService)
throws LifecycleException
httpService - the configuration bean.
LifecycleException
public void updateMapper(HttpService httpService,
com.sun.grizzly.config.dom.NetworkListener httpListener,
com.sun.grizzly.util.http.mapper.Mapper mapper)
httpService - HttpServicehttpListener - NetworkListener, which Mapper was changedmapper - new Mapper value
public WebConnector addConnector(com.sun.grizzly.config.dom.NetworkListener httpListener,
HttpService httpService,
boolean start)
throws LifecycleException
LifecycleException
public void deleteConnector(WebConnector connector)
throws LifecycleException
LifecycleException
public void deleteConnector(com.sun.grizzly.config.dom.NetworkListener httpListener)
throws LifecycleException
LifecycleExceptionpublic void updateAccessLog(HttpService httpService)
protected boolean isTomcatUsingDefaultDomain()
public java.lang.Class loadCommonClass(java.lang.String className)
throws java.lang.Exception
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||