public class ServletContextWebAppRegistry extends WebAppRegistry
In addition, this registry checks for the differing versions of the DSP tag library, since it gets invoked by NucleusServlet during start-up, providing a time when the Thread's context ClassLoader is set for the web-app.
WebAppRegistry
NucleusServlet
ServletContextListenerWebAppRegistery| Modifier and Type | Class and Description |
|---|---|
static interface |
ServletContextWebAppRegistry.ServletContextWebAppRegistryListener
An interface for notifications when a web-app gets added
or deleted.
|
static class |
ServletContextWebAppRegistry.TaglibFingerPrint
A data-structure for holding the check-sum of DSP taglib
resources.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
protected static java.util.ResourceBundle |
sResources
Our resource bundle.
|
SERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description |
|---|
ServletContextWebAppRegistry() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addWebApp(WebApp pWebApp)
Add the specified web-app and send out an event to
any listeners.
|
protected void |
checkFingerPrintOfWebApp(WebApp pWebApp)
Check the finger-print of the DSP taglib of the specified WebApp against
the expected result.
|
void |
checkWebAppFingerPrints()
Check the fingerprints of that DSP taglib in the various web-apps.
|
protected ServletContextWebAppRegistry.TaglibFingerPrint |
createTaglibFingerPrint(WebApp pWebApp,
java.lang.ClassLoader pClassLoader)
Create a TaglibFingerPrint from the specified ClassLoader.
|
void |
doStartService()
Called after the service has been created, placed into the
naming hierarchy, and initialized with its configured
property values.
|
protected void |
doStartupChecks()
Perform the various startup checks, and register so that
checkFingerPrintOfWebApp() gets called whenever additional WebApps
are registered.
|
void |
doStopService()
doStopService |
static java.lang.String |
getRealPath(javax.servlet.ServletContext sc,
java.lang.String pUrl)
Return the path to the input resource pUrl.
|
java.util.Map<javax.servlet.ServletContext,java.lang.ref.WeakReference<java.lang.ClassLoader>> |
getServletContextToClassLoader()
Returns property serlvetContextToClassLoader.
|
java.util.List<ServletContextWebAppRegistry.ServletContextWebAppRegistryListener> |
getServletContextWepAppRegistryListeners()
Returns property ServletContextWepAppRegistryListeners.
|
ServletContextWebAppRegistry.TaglibFingerPrint |
getTaglibFingerPrint()
Return the DSP taglib fingerprint.
|
java.util.Map<java.lang.String,WebApp> |
getWebApps()
Get the Map of currently deployed web applications
|
protected boolean |
matchesExpected(ServletContextWebAppRegistry.TaglibFingerPrint pOther,
WebApp pWebApp)
Return whether the checksums in TaglibFingerPrint match
the expected checksums.
|
static void |
register(javax.servlet.ServletContext pServletContext)
Notification that the web application is ready to process requests.
|
static void |
unregister(javax.servlet.ServletContext pServletContext)
Notification that the web application is ready to process requests.
|
addListener, createAdminServlet, getHiddenWebApps, getSiteHttpServerName, getSiteHttpServerPort, getUrl, getUrl, getWebAppByContextRoot, getWebAppByName, getWebAppByProperty, isHiddenWebApp, register, removeListener, removeWebApp, savePropertyFilesToDir, sendEvent, setHiddenWebApps, setSiteHttpServerName, setSiteHttpServerPort, toString, unregisteraddLogListener, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopServicevlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic static java.lang.String CLASS_VERSION
protected static final java.util.ResourceBundle sResources
public java.util.Map<java.lang.String,WebApp> getWebApps()
WebAppRegistrygetWebApps in class WebAppRegistryMap of deployed WebAppspublic java.util.List<ServletContextWebAppRegistry.ServletContextWebAppRegistryListener> getServletContextWepAppRegistryListeners()
public java.util.Map<javax.servlet.ServletContext,java.lang.ref.WeakReference<java.lang.ClassLoader>> getServletContextToClassLoader()
public ServletContextWebAppRegistry.TaglibFingerPrint getTaglibFingerPrint()
public static java.lang.String getRealPath(javax.servlet.ServletContext sc,
java.lang.String pUrl)
sc - a ServletContext valuepUrl - a String valueString valuepublic static void addWebApp(WebApp pWebApp)
pWebApp - the web app to addpublic static void register(javax.servlet.ServletContext pServletContext)
pServletContext - a ServletContext valuepublic static void unregister(javax.servlet.ServletContext pServletContext)
pServletContext - a ServletContext valuepublic void doStartService()
WebAppRegistrydoStartService in class WebAppRegistryprotected void doStartupChecks()
public void checkWebAppFingerPrints()
public void doStopService()
WebAppRegistrydoStopServicedoStopService in class WebAppRegistryprotected void checkFingerPrintOfWebApp(WebApp pWebApp)
protected boolean matchesExpected(ServletContextWebAppRegistry.TaglibFingerPrint pOther, WebApp pWebApp)
pOther - the taglib finger print associated with pWebApppWebApp - the web application whose finger print is being checked.protected ServletContextWebAppRegistry.TaglibFingerPrint createTaglibFingerPrint(WebApp pWebApp, java.lang.ClassLoader pClassLoader) throws java.io.IOException
pWebApp - the web-app from which to create a DSP taglib finger print .pClassLoader - the classloader associated with pWebAppjava.io.IOException