|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.service.webappregistry.WebAppRegistry atg.service.webappregistry.ServletContextWebAppRegistry
public class ServletContextWebAppRegistry
This is an implementation of WebAppRegistry. This implementation registers apps defined by a ServletContext. It is used by NucleusServlet to register Dynamo specific WebApps.
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
Nested Class Summary | |
---|---|
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. |
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
protected static java.util.ResourceBundle |
sResources
Our resource bundle. |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
ServletContextWebAppRegistry()
|
Method Summary | |
---|---|
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. |
Methods inherited from class atg.service.webappregistry.WebAppRegistry |
---|
addListener, createAdminServlet, getHiddenWebApps, getSiteHttpServerName, getSiteHttpServerPort, getUrl, getUrl, getWebAppByContextRoot, getWebAppByName, getWebAppByProperty, isHiddenWebApp, register, removeListener, removeWebApp, savePropertyFilesToDir, sendEvent, setHiddenWebApps, setSiteHttpServerName, setSiteHttpServerPort, toString, unregister |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
protected static final java.util.ResourceBundle sResources
Constructor Detail |
---|
public ServletContextWebAppRegistry()
Method Detail |
---|
public java.util.Map<java.lang.String,WebApp> getWebApps()
WebAppRegistry
getWebApps
in class WebAppRegistry
Map
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
value
String
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()
WebAppRegistry
doStartService
in class WebAppRegistry
protected void doStartupChecks()
public void checkWebAppFingerPrints()
public void doStopService()
WebAppRegistry
doStopService
doStopService
in class WebAppRegistry
protected 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 pWebApp
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |