public class WebModule extends PwcWebModule implements Context
StandardContext.RestrictedServletContextListenerContainerBase.ContainerBackgroundProcessor, ContainerBase.PrivilegedAddChild| Modifier and Type | Field and Description |
|---|---|
protected Object[] |
cachedFinds
Cached findXXX results
|
protected static ResourceBundle |
rb |
_id, defaultCharset, formHintField, webSessionCookieConfigallowLinking, cacheMaxSize, cacheTTL, caseSensitive, caseSensitiveMapping, context, contextListeners, directoryDeployed, directoryListing, filterRegisMap, isJsfApplication, servletRegisMap, servletReloadCheckSecs, showArchivedRealPathEnabled, urlEncoderbackgroundProcessorDelay, checkIfRequestIsSecure, children, controller, debug, domain, hasCustomPipeline, initialized, lifecycle, listeners, loader, log, manager, name, notifyContainerListeners, oname, parent, parentClassLoader, pipeline, readLock, realm, resources, started, support, writeLockRELOAD_EVENTADD_CHILD_EVENT, ADD_MAPPER_EVENT, ADD_VALVE_EVENT, REMOVE_CHILD_EVENT, REMOVE_MAPPER_EVENT, REMOVE_VALVE_EVENTAFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, INIT_EVENT, START_EVENT, STOP_EVENT| Constructor and Description |
|---|
WebModule()
Constructor.
|
WebModule(org.glassfish.hk2.api.ServiceLocator services) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAdHocValve(GlassFishValve valve)
Adds the given valve to this web module's ad-hoc pipeline.
|
protected void |
addCatalinaListener(String listenerName)
Adds the Catalina listener with the given class name to this
WebModule.
|
protected void |
addValve(String className)
Instantiates a Valve from the given className
and adds it to the Pipeline of this WebModule.
|
protected void |
addValve(Valve valveDescriptor)
Constructs a Valve from the given valveDescriptor
and adds it to the Pipeline of this WebModule.
|
void |
afterServiceEvent(String servletName,
int status) |
void |
beforeServiceEvent(String servletName) |
protected void |
callServletContainerInitializers() |
protected void |
configureCatalinaProperties()
Configure the WebModule
|
protected void |
configureCatalinaProperties(String propName,
String propValue)
Configure the WebModule
|
protected void |
configureSessionSettings(WebBundleDescriptor wbd,
WebModuleConfig wmInfo)
Create and configure the session manager for this web application
according to the persistence type specified.
|
protected void |
configureValves()
Configure the
WebModule valves. |
protected void |
contextListenerStart()
Notifies all ServletContextListeners at their contextInitialized
method.
|
protected ServletRegistrationImpl |
createDynamicServletRegistrationImpl(StandardWrapper wrapper) |
protected <T extends javax.servlet.Filter> |
createFilterInstance(Class<T> clazz)
Instantiates the given Filter class.
|
<T extends javax.servlet.http.HttpUpgradeHandler> |
createHttpUpgradeHandlerInstance(Class<T> clazz)
Create an instance of a given class.
|
<T extends EventListener> |
createListenerInstance(Class<T> clazz)
Instantiates the given EventListener class.
|
ObjectInputStream |
createObjectInputStream(InputStream is)
Creates an ObjectInputStream that provides special deserialization
logic for classes that are normally not serializable (such as
javax.naming.Context).
|
ObjectOutputStream |
createObjectOutputStream(OutputStream os)
Creates an ObjectOutputStream that provides special serialization
logic for classes that are normally not serializable (such as
javax.naming.Context).
|
protected <T extends javax.servlet.Servlet> |
createServletInstance(Class<T> clazz)
Instantiates the given Servlet class.
|
protected ServletRegistrationImpl |
createServletRegistrationImpl(StandardWrapper wrapper) |
Pipeline |
getAdHocPipeline()
Gets this web module's ad-hoc pipeline.
|
String |
getAdHocServletName(String path)
Returns the name of the ad-hoc servlet responsible for servicing the
given path.
|
Application |
getBean() |
Object[] |
getCachedFindOperation()
Return the cached result of doing findXX on this object
NOTE: this method MUST be used only when loading/using
the content of default-web.xml
|
String |
getComponentId()
Gets ComponentId for Invocation.
|
String |
getFileEncoding()
Gets the file encoding of all static resources of this web module.
|
SunWebAppImpl |
getIasWebAppConfigBean()
gets the sun-web.xml config bean
|
LocaleCharsetMap[] |
getLocaleCharsetMap()
return locale-charset-map
|
String |
getMonitoringNodeName() |
SecurityConfig |
getSecurityConfig()
Gets the security related configuration for this context
|
ServerContext |
getServerContext()
Gets ServerContext.
|
protected org.glassfish.hk2.classmodel.reflect.Types |
getTypes() |
long |
getUniqueId() |
WebBundleDescriptor |
getWebBundleDescriptor()
Gets the WebBundleDesciptor (web.xml) for this WebModule.
|
WebContainer |
getWebContainer()
Gets the web container in which this web module was loaded.
|
WebModuleConfig |
getWebModuleConfig() |
boolean |
hasAdHocPaths()
Indicates whether this web module contains any ad-hoc paths.
|
boolean |
hasAdHocSubtrees()
Indicates whether this web module contains any ad-hoc subtrees.
|
boolean |
hasBeenXmlConfigured()
Return
true if the default=web.xml has been read for
this module. |
boolean |
hasLocaleToCharsetMapping()
Returns true if this web module specifies a locale-charset-map in its
sun-web.xml, false otherwise.
|
protected boolean |
isStandalone() |
protected EventListener |
loadListener(ClassLoader loader,
String listenerClassName)
Loads and instantiates the listener with the specified classname.
|
String |
mapLocalesToCharset(Enumeration locales)
Matches the given request locales against the charsets specified in
the locale-charset-map of this web module's sun-web.xml, and returns
the first matching charset.
|
void |
removeAdHocValve(GlassFishValve valve)
Removes the given valve from this web module's ad-hoc pipeline.
|
protected void |
removePatternFromServlet(Wrapper wrapper,
String pattern)
This method is overridden in web-glue to also remove the given
mapping from the deployment backend's WebBundleDescriptor.
|
void |
servletDestroyedEvent(String servletName) |
void |
servletInitializedEvent(String servletName) |
void |
sessionActivatedEndEvent(javax.servlet.http.HttpSession session)
Trigger for monitoring
|
void |
sessionActivatedStartEvent(javax.servlet.http.HttpSession session)
Trigger for monitoring
|
void |
sessionCreatedEvent(javax.servlet.http.HttpSession session)
Trigger for monitoring
|
void |
sessionDestroyedEvent(javax.servlet.http.HttpSession session)
Trigger for monitoring
|
void |
sessionExpiredEvent(javax.servlet.http.HttpSession session)
Trigger for monitoring
|
void |
sessionPassivatedEndEvent(javax.servlet.http.HttpSession session)
Trigger for monitoring
|
void |
sessionPassivatedStartEvent(javax.servlet.http.HttpSession session)
Trigger for monitoring
|
void |
sessionPersistedEndEvent(javax.servlet.http.HttpSession session)
Trigger for monitoring
|
void |
sessionPersistedStartEvent(javax.servlet.http.HttpSession session)
Trigger for monitoring
|
void |
sessionRejectedEvent(int maxSessions)
Trigger for monitoring
|
void |
setBean(Application bean) |
void |
setCachedFindOperation(Object[] cachedFinds)
Cache the result of doing findXX on this object
NOTE: this method MUST be used only when loading/using
the content of default-web.xml
|
void |
setFileEncoding(String enc)
Sets the file encoding of all static resources of this web module.
|
void |
setI18nInfo()
Sets the parameter encoding (i18n) info from sun-web.xml.
|
void |
setIasWebAppConfigBean(SunWebAppImpl iasBean)
set the sun-web.xml config bean
|
void |
setParent(Container container)
Sets the virtual server parent of this web module, and passes it on to
this web module's realm adapter..
|
void |
setRealm(Realm realm)
Set the Realm with which this Container is associated.
|
void |
setSecurityConfig(SecurityConfig config)
Set the security related configuration for this context
|
void |
setWebContainer(WebContainer webContainer)
Sets the web container in which this web module was loaded.
|
void |
setWebModuleConfig(WebModuleConfig wmInfo) |
void |
setXmlConfigured(boolean hasBeenXmlConfigured)
Set to
true when the default-web.xml has been read for
this module. |
void |
start()
Starts this web module.
|
void |
stop()
Stops this web module.
|
void |
webModuleStartedEvent() |
void |
webModuleStoppedEvent() |
createWrapper, getCacheControls, getContextRoot, getDefaultCharset, getEncodeCookies, getEndpointAddresses, getFormHintField, getHasWebServices, getID, getModuleName, getResponseCTForHeaders, getSessionCookieConfig, getSessionCookieConfigFromSunWebXml, getSTMPoolSize, hasWebXml, setCacheControls, setContextRoot, setEncodeCookies, setEndpointAddresses, setHasWebServices, setHasWebXml, setID, setModuleName, setResponseCTForHeaders, setSessionCookieConfigFromSunWebXml, setSTMPoolSizeaddAlternateDocBase, addApplicationListener, addApplicationParameter, addChild, addChild, addConstraint, addEjb, addEnvironment, addEnvironment, addErrorPage, addFilter, addFilter, addFilter, addFilterDef, addFilterDef, addFilterMap, addFilterMap, addFilterMaps, addInstanceListener, addInstanceListener, addJspMapping, addListener, addListener, addListener, addLocaleEncodingMappingParameter, addLocalEjb, addMessageDestination, addMessageDestinationRef, addMimeMapping, addParameter, addResource, addResource, addResourceEnvRef, addResourceLink, addResourceLink, addResourceParams, addRoleMapping, addSecurityRole, addServlet, addServlet, addServlet, addServlet, addServlet, addServletMapping, addServletMapping, addServletMapping, addServletMapping, addWatchedResource, addWelcomeFile, addWrapperLifecycle, addWrapperListener, adjustURLPattern, alternateResourcesStart, alternateResourcesStop, backgroundProcess, create, createFilter, createListener, createLoader, createObjectName, createObjectName, createObjectName, createObjectName, createServlet, declareRoles, destroy, engineBase, filterStart, filterStop, findApplicationParameters, findEjb, findEjbs, findEnvironment, findEnvironments, findErrorPage, findErrorPage, findFilterConfig, findFilterDef, findFilterDefs, findFilterMaps, findInstanceListeners, findLocalEjb, findLocalEjbs, findMappingObject, findMessageDestination, findMessageDestinationRef, findMessageDestinationRefs, findMessageDestinations, findMimeMapping, findMimeMappings, findParameter, findParameters, findResource, findResourceEnvRef, findResourceEnvRefs, findResourceLink, findResourceLinks, findResources, findRoleMapping, findServletMapping, findServletMappings, findStaticResources, findStatusPage, findStatusPages, findWelcomeFile, findWelcomeFiles, findWrapperLifecycles, findWrapperListeners, fireRequestDestroyedEvent, fireRequestInitializedEvent, getAllowRelativeRedirect, getAltDDName, getAlternateDocBases, getAntiJARLocking, getApplicationEventListeners, getAttribute, getAttributeNames, getAuditors, getAuthenticator, getAvailable, getCacheMaxSize, getCacheTTL, getCharsetMapper, getCharsetMapperClass, getClassLoader, getCompilerClasspath, getConfigFile, getConfigured, getConstraints, getContext, getContextPath, getCookies, getCrossContext, getDefaultConfigFile, getDefaultErrorPage, getDefaultSessionTrackingModes, getDefaultWebXml, getDelegate, getDisplayName, getDistributable, getDocBase, getEffectiveMajorVersion, getEffectiveMinorVersion, getEffectiveSessionTrackingModes, getEncodedPath, getEngineName, getEnvironments, getFilterRegistration, getFilterRegistrations, getHostname, getInfo, getInitParameter, getInitParameterNames, getJ2EEApplication, getJ2EEServer, getJspConfigDescriptor, getJvmRoute, getLoginConfig, getMajorVersion, getManagerChecksFrequency, getMapper, getMimeType, getMinorVersion, getNamedDispatcher, getNamingContextName, getNamingResources, getOriginalDocBase, getOverride, getParentName, getPath, getPaused, getPrivileged, getPublicId, getRealPath, getReloadable, getRequestDispatcher, getResource, getResourceAsStream, getResourceLinks, getResourceNames, getResourcePaths, getReuseSessionID, getServerInfo, getServlet, getServletContext, getServletContextName, getServletNameFilterMappings, getServletNames, getServletRegistration, getServletRegistrations, getServlets, getSessionCookieName, getSessionListeners, getSessionParameterName, getSessionTimeout, getStartTimeMillis, getStartupTime, getState, getStaticResources, getTldNamespaceAware, getTldScanTime, getTldValidation, getUnloadDelay, getUnpackWAR, getUrlPatternFilterMappings, getVirtualServerName, getWatchedResources, getWelcomeFiles, getWorkDir, getWorkPath, getXmlNamespaceAware, getXmlValidation, hasConstraints, hasFilter, hasSecurityRole, hasServlet, hasWatchedResources, init, isAllowLinking, isCachingAllowed, isCaseSensitive, isCaseSensitiveMapping, isDirectoryListing, isEmbedded, isEnableURLRewriting, isEventProvider, isFilesystemBased, isJsfApplication, isReload, isReplaceWelcomeFiles, isSecurePagesWithPragma, isServlet22, isSessionTimeoutOveridden, isStatisticsProvider, isUseMyFaces, isUseNaming, loadOnStartup, log, log, log, managerStart, managerStop, reload, removeApplicationParameter, removeAttribute, removeChild, removeConstraints, removeEjb, removeEnvironment, removeErrorPages, removeFilterDef, removeFilterMaps, removeInstanceListener, removeLocalEjb, removeMessageDestination, removeMessageDestinationRef, removeMimeMapping, removeParameter, removeResource, removeResourceEnvRef, removeResourceLink, removeRoleMapping, removeSecurityRoles, removeServletMapping, removeWatchedResources, removeWelcomeFiles, removeWrapperLifecycles, removeWrapperListeners, resourcesStart, resourcesStop, restrictedSetPipeline, sendNotification, setAllowLinking, setAllowRelativeRedirect, setAltDDName, setAntiJARLocking, setAttribute, setAuditors, setAvailable, setCacheMaxSize, setCacheTTL, setCachingAllowed, setCaseSensitive, setCaseSensitiveMapping, setCharsetMapper, setCharsetMapperClass, setCompilerClasspath, setConfigFile, setConfigured, setCookies, setCrossContext, setDefaultWebXml, setDelegate, setDirectoryListing, setDisplayName, setDistributable, setDocBase, setEffectiveMajorVersion, setEffectiveMinorVersion, setEmbedded, setEnableURLRewriting, setEngineName, setInitParameter, setJ2EEApplication, setJ2EEServer, setJspConfigDescriptor, setJvmRoute, setLoginConfig, setManagerChecksFrequency, setName, setNamingResources, setOrderedLibs, setOriginalDocBase, setOverride, setPath, setPrivileged, setPublicId, setReload, setReloadable, setReplaceWelcomeFiles, setResources, setReuseSessionID, setSecurePagesWithPragma, setServletContainerInitializerInterestList, setSessionTimeout, setSessionTrackingModes, setStartupTime, setTldNamespaceAware, setTldScanTime, setTldValidation, setUnloadDelay, setUnpackWAR, setUseMyFaces, setUseNaming, setWorkDir, setXmlNamespaceAware, setXmlValidation, startRecursive, stop, toString, validateURLPatternaddContainerListener, addLifecycleListener, addPropertyChangeListener, addValve, addValve, findChild, findChildren, findContainerListeners, findLifecycleListeners, fireContainerEvent, getBackgroundProcessorDelay, getBasic, getChildren, getContainerSuffix, getDebug, getDomain, getJmxName, getLoader, getLogger, getManager, getMappingObject, getName, getObjectName, getParent, getParentClassLoader, getPipeline, getRealm, getResources, getValveObjectNames, getValves, hasCustomPipeline, hasNonBasicValves, invoke, isCheckIfRequestIsSecure, logName, removeContainerListener, removeLifecycleListener, removeLifecycleListeners, removePropertyChangeListener, removeValve, setBackgroundProcessorDelay, setBasic, setCheckIfRequestIsSecure, setDebug, setDomain, setLoader, setLogger, setManager, setParentClassLoader, startChildren, threadStart, threadStopclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddListener, addListener, getPath, isDirectoryListing, setDefaultWebXml, setDirectoryListing, setPathgetAttribute, getAttributeNames, getContext, getMajorVersion, getMimeType, getMinorVersion, getRealPath, getRequestDispatcher, getResource, getResourceAsStream, getServerInfo, getServlet, getServletNames, getServlets, log, log, log, removeAttribute, setAttributeaddContainerListener, addPropertyChangeListener, findChild, findChildren, findContainerListeners, fireContainerEvent, getBackgroundProcessorDelay, getLoader, getLogger, getManager, getMappingObject, getName, getParent, getParentClassLoader, getPipeline, getRealm, getResources, hasCustomPipeline, invoke, isCheckIfRequestIsSecure, removeContainerListener, removePropertyChangeListener, setBackgroundProcessorDelay, setCheckIfRequestIsSecure, setLoader, setLogger, setManager, setParentClassLoaderprotected static final ResourceBundle rb
protected Object[] cachedFinds
public WebModule()
public WebModule(org.glassfish.hk2.api.ServiceLocator services)
public void setIasWebAppConfigBean(SunWebAppImpl iasBean)
public SunWebAppImpl getIasWebAppConfigBean()
public WebContainer getWebContainer()
public void setWebContainer(WebContainer webContainer)
public void setWebModuleConfig(WebModuleConfig wmInfo)
public WebModuleConfig getWebModuleConfig()
public String getMonitoringNodeName()
public void setI18nInfo()
public LocaleCharsetMap[] getLocaleCharsetMap()
public boolean hasLocaleToCharsetMapping()
hasLocaleToCharsetMapping in class PwcWebModulepublic String mapLocalesToCharset(Enumeration locales)
mapLocalesToCharset in class PwcWebModulelocales - Request localespublic ObjectInputStream createObjectInputStream(InputStream is) throws IOException
createObjectInputStream in class StandardContextIOExceptionpublic ObjectOutputStream createObjectOutputStream(OutputStream os) throws IOException
createObjectOutputStream in class StandardContextIOExceptionpublic void setXmlConfigured(boolean hasBeenXmlConfigured)
true when the default-web.xml has been read for
this module.public boolean hasBeenXmlConfigured()
true if the default=web.xml has been read for
this module.public void setCachedFindOperation(Object[] cachedFinds)
public Object[] getCachedFindOperation()
public void setRealm(Realm realm)
ContainerBasesetRealm in interface ContainersetRealm in class ContainerBaserealm - The newly associated Realmpublic void start()
throws LifecycleException
start in interface Lifecyclestart in class StandardContextLifecycleException - if a startup error occurspublic void stop()
throws LifecycleException
stop in interface Lifecyclestop in class StandardContextLifecycleException - if a shutdown error occursprotected void contextListenerStart()
StandardContextcontextListenerStart in class StandardContextprotected org.glassfish.hk2.classmodel.reflect.Types getTypes()
getTypes in class StandardContextprotected void callServletContainerInitializers()
throws LifecycleException
callServletContainerInitializers in class StandardContextLifecycleExceptionpublic void setParent(Container container)
setParent in interface ContainersetParent in class ContainerBasecontainer - The virtual server parentpublic boolean hasAdHocPaths()
hasAdHocPaths in interface ContexthasAdHocPaths in class StandardContextpublic boolean hasAdHocSubtrees()
public String getAdHocServletName(String path)
getAdHocServletName in interface ContextgetAdHocServletName in class StandardContextpath - The path whose associated ad-hoc servlet is neededpublic void addAdHocValve(GlassFishValve valve)
valve - The valve to addpublic void removeAdHocValve(GlassFishValve valve)
valve - The valve to removepublic Pipeline getAdHocPipeline()
public void setFileEncoding(String enc)
enc - The file encoding of static resources of this web modulepublic String getFileEncoding()
protected void configureValves()
WebModule valves.protected void configureCatalinaProperties()
WebModule
protected void configureCatalinaProperties(String propName, String propValue)
WebModule
propName - the property namepropValue - the property valueprotected void addValve(String className)
className - the fully qualified class name of the Valveprotected void addValve(Valve valveDescriptor)
valveDescriptor - the object containing the information to
create the valve.protected void addCatalinaListener(String listenerName)
listenerName - The fully qualified class name of the listenerpublic Application getBean()
public void setBean(Application bean)
protected boolean isStandalone()
isStandalone in class StandardContextpublic WebBundleDescriptor getWebBundleDescriptor()
public String getComponentId()
public ServerContext getServerContext()
protected EventListener loadListener(ClassLoader loader, String listenerClassName) throws Exception
loadListener in class StandardContextloader - the classloader to uselistenerClassName - the fully qualified classname to instantiateException - if the specified classname fails to be loaded or
instantiatedprotected void configureSessionSettings(WebBundleDescriptor wbd, WebModuleConfig wmInfo)
protected ServletRegistrationImpl createServletRegistrationImpl(StandardWrapper wrapper)
createServletRegistrationImpl in class StandardContextprotected ServletRegistrationImpl createDynamicServletRegistrationImpl(StandardWrapper wrapper)
createDynamicServletRegistrationImpl in class StandardContextprotected void removePatternFromServlet(Wrapper wrapper, String pattern)
StandardContextremovePatternFromServlet in class StandardContextprotected <T extends javax.servlet.Servlet> T createServletInstance(Class<T> clazz) throws Exception
createServletInstance in class StandardContextExceptionprotected <T extends javax.servlet.Filter> T createFilterInstance(Class<T> clazz) throws Exception
createFilterInstance in class StandardContextExceptionpublic <T extends EventListener> T createListenerInstance(Class<T> clazz) throws Exception
createListenerInstance in class StandardContextExceptionpublic <T extends javax.servlet.http.HttpUpgradeHandler> T createHttpUpgradeHandlerInstance(Class<T> clazz) throws Exception
createHttpUpgradeHandlerInstance in class StandardContextclazz - Exceptionpublic void servletInitializedEvent(String servletName)
public void servletDestroyedEvent(String servletName)
public void beforeServiceEvent(String servletName)
public void afterServiceEvent(String servletName, int status)
public void sessionCreatedEvent(javax.servlet.http.HttpSession session)
StandardContextsessionCreatedEvent in class StandardContextSessionStatsProviderpublic void sessionDestroyedEvent(javax.servlet.http.HttpSession session)
StandardContextpublic void sessionRejectedEvent(int maxSessions)
StandardContextsessionRejectedEvent in class StandardContextSessionStatsProvider.sessionRejectedEvent(int, java.lang.String, java.lang.String)public void sessionExpiredEvent(javax.servlet.http.HttpSession session)
StandardContextsessionExpiredEvent in class StandardContextSessionStatsProvider.sessionExpiredEvent(java.lang.String, java.lang.String, java.lang.String)public void sessionPersistedStartEvent(javax.servlet.http.HttpSession session)
StandardContextpublic void sessionPersistedEndEvent(javax.servlet.http.HttpSession session)
StandardContextpublic void sessionActivatedStartEvent(javax.servlet.http.HttpSession session)
StandardContextpublic void sessionActivatedEndEvent(javax.servlet.http.HttpSession session)
StandardContextpublic void sessionPassivatedStartEvent(javax.servlet.http.HttpSession session)
StandardContextpublic void sessionPassivatedEndEvent(javax.servlet.http.HttpSession session)
StandardContextpublic void webModuleStartedEvent()
public void webModuleStoppedEvent()
public SecurityConfig getSecurityConfig()
ContextSecurityConfigpublic void setSecurityConfig(SecurityConfig config)
Contextconfig - the security configuration for this contextSecurityConfigpublic long getUniqueId()
getUniqueId in class StandardContextCopyright © 2017. All rights reserved.