public abstract class WebAppRegistry extends GenericService
WebAppRegistry
is an abstract class that
implements the basic properties and methods for a registry
that contains deployed web applications. Discovery of the
web applications is left to the particular implementation
of this class.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION |
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
WebAppRegistry() |
Modifier and Type | Method and Description |
---|---|
static void |
addListener(WebAppListener pListener)
addListener |
protected javax.servlet.Servlet |
createAdminServlet()
Creates and returns a new Servlet that will
administer this service.
|
void |
doStartService()
Called after the service has been created, placed into the
naming hierarchy, and initialized with its configured
property values.
|
void |
doStopService()
doStopService |
static java.lang.String[] |
getHiddenWebApps()
Get the value of HiddenWebApps.
|
java.lang.String |
getSiteHttpServerName()
Returns the name of the server configured to serve HTTP requests.
|
int |
getSiteHttpServerPort() |
java.lang.String |
getUrl(java.lang.String pAppName) |
java.lang.String |
getUrl(WebApp pWebApp) |
WebApp |
getWebAppByContextRoot(java.lang.String pContextRoot) |
WebApp |
getWebAppByName(java.lang.String pName) |
WebApp |
getWebAppByProperty(java.lang.String pPropName,
java.lang.String pPropValue) |
abstract java.util.Map |
getWebApps()
Get the Map of currently deployed web applications
|
static boolean |
isHiddenWebApp(java.lang.String pName) |
void |
register(java.lang.Object pObj)
registerWebApp |
static void |
removeListener(WebAppListener pListener)
removeListener |
boolean |
removeWebApp(java.lang.String pName) |
void |
savePropertyFilesToDir(java.lang.String pPath) |
static void |
sendEvent(WebAppRegistry pRegistry,
WebApp pWebApp)
Send an event to pRegistry's listeners about pWebApp.
|
static void |
setHiddenWebApps(java.lang.String[] v)
Set the value of HiddenWebApps.
|
void |
setSiteHttpServerName(java.lang.String pSiteHttpServerName)
Sets the name of the server configured to serve HTTP requests.
|
void |
setSiteHttpServerPort(int pSiteHttpServerPort) |
java.lang.String |
toString() |
void |
unregister(java.lang.Object pObj) |
addLogListener, 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, stopService
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static final java.lang.String CLASS_VERSION
public java.lang.String getSiteHttpServerName()
public void setSiteHttpServerName(java.lang.String pSiteHttpServerName)
public void setSiteHttpServerPort(int pSiteHttpServerPort)
public int getSiteHttpServerPort()
public static java.lang.String[] getHiddenWebApps()
public static void setHiddenWebApps(java.lang.String[] v)
v
- Value to assign to HiddenWebApps.public static boolean isHiddenWebApp(java.lang.String pName)
public abstract java.util.Map getWebApps()
Map
of deployed WebAppspublic void register(java.lang.Object pObj)
registerWebApp
pObj
- a Object
of WebAppspublic void unregister(java.lang.Object pObj)
public boolean removeWebApp(java.lang.String pName)
public WebApp getWebAppByName(java.lang.String pName)
public WebApp getWebAppByContextRoot(java.lang.String pContextRoot)
public WebApp getWebAppByProperty(java.lang.String pPropName, java.lang.String pPropValue)
public void doStartService() throws ServiceException
doStartService
in class GenericService
ServiceException
- if the service had a problem
starting uppublic void doStopService() throws ServiceException
doStopService
doStopService
in class GenericService
ServiceException
- if an error occursprotected javax.servlet.Servlet createAdminServlet()
createAdminServlet
in class GenericService
Servlet
valuepublic static void addListener(WebAppListener pListener)
addListener
pListener
- a WebAppListener
valuepublic static void removeListener(WebAppListener pListener)
removeListener
pListener
- a WebAppListener
valuepublic static void sendEvent(WebAppRegistry pRegistry, WebApp pWebApp)
pRegistry
- the WebAppRegistry whose listeners should be notified
of an event.pWebApp
- the web-application to send an event concerningpublic java.lang.String toString()
toString
in class java.lang.Object
public void savePropertyFilesToDir(java.lang.String pPath)
public java.lang.String getUrl(java.lang.String pAppName)
public java.lang.String getUrl(WebApp pWebApp)