private boolean isWebAppStarting() { if (!isWebAppStarting) { return false; } isWebAppStarting = !webAppContext.isAvailable(); return isWebAppStarting; }
@Override public void setInitParameter(String name, String value) { webAppContext.setInitParameter(name, value); }
private void addlatestAgentStatusCall(WebAppContext wac) { wac.addServlet(AgentStatusApi.class, "/admin/latest-agent.status"); }
/** * Set a value in the webapp context. These values are available to the jsp * pages as "application.getAttribute(name)". * @param name The name of the attribute * @param value The value of the attribute */ public void setAttribute(String name, Object value) { webAppContext.setAttribute(name, value); }
@Override public void preConfigure(final WebAppContext context) throws Exception { //Make a temp directory for the webapp if one is not already set resolveTempDirectory(context); //Extract webapp if necessary unpack (context); findAndFilterContainerPaths(context); findAndFilterWebAppPaths(context); //No pattern to appy to classes, just add to metadata context.getMetaData().setWebInfClassesDirs(findClassDirs(context)); }
@Override public void preConfigure(WebAppContext context) throws Exception { //add all discovered web-fragment.xmls addWebFragments(context, context.getMetaData()); }
/** * Get the value in the webapp context. * @param name The name of the attribute * @return The value of the attribute */ public Object getAttribute(String name) { return webAppContext.getAttribute(name); }
@Override public void parse () throws Exception { super.parse(); processVersion(); processOrdering(); }
@Override public boolean hasStarted() { return !webAppContext.isFailed() && webAppContext.getUnavailableException() == null; }
@Override protected void startContext() throws Exception { configure(); //resolve the metadata _metadata.resolve(this); startWebapp(); }
@Override public void configure(WebAppContext context) throws Exception { for (Configuration configuration : _template.getConfigurations()) configuration.cloneConfigure(_template,context); }
@Override public void parse () throws Exception { super.parse(); processName(); }
@Override public Throwable getUnavailableException() { return webAppContext.getUnavailableException(); }