@Override protected void doStart() throws Exception { resourceHandler.doStart(); super.doStart(); }
/** * Inform this container that the server is being stopped. * This method must be implicitly called before the server containing this container is stopped. * * @throws java.lang.Exception if a problem occurred during server shutdown. */ @Override public void doStop() throws Exception { super.doStop(); appHandler.onShutdown(this); appHandler = null; }
@Override public String getObjectContextBasis() { if (_managed != null ) { String basis = null; if (_managed instanceof ContextHandler) { return null; } else if (_managed instanceof AbstractHandler) { AbstractHandler handler = (AbstractHandler)_managed; Server server = handler.getServer(); if (server != null) { ContextHandler context = AbstractHandlerContainer.findContainerOf(server, ContextHandler.class, handler); if (context != null) basis = getContextName(context); } } if (basis != null) return basis; } return super.getObjectContextBasis(); }
@Override public void destroy() { if (!isStopped()) throw new IllegalStateException("!STOPPED"); super.destroy(); }
@Override public void dumpThis(Appendable out) throws IOException { out.append(toString()).append(" - ").append(getState()).append('\n'); }
private void attachNoContentHandler() { AbstractHandler noContentHandler = new NoContentOutputErrorHandler(); // This part is needed to avoid WARN while starting container. noContentHandler.setServer(server); server.addBean(noContentHandler); }
@Override public void setServer(Server server) { if (_server==server) return; if (isStarted()) throw new IllegalStateException(STARTED); _server=server; }
@Override public String getObjectContextBasis() { if (_managed != null ) { String basis = null; if (_managed instanceof ContextHandler) { return null; } else if (_managed instanceof AbstractHandler) { AbstractHandler handler = (AbstractHandler)_managed; Server server = handler.getServer(); if (server != null) { ContextHandler context = AbstractHandlerContainer.findContainerOf(server, ContextHandler.class, handler); if (context != null) basis = getContextName(context); } } if (basis != null) return basis; } return super.getObjectContextBasis(); }
@Override public void destroy() { if (!isStopped()) throw new IllegalStateException("!STOPPED"); super.destroy(); }
@Override public void dumpThis(Appendable out) throws IOException { out.append(toString()).append(" - ").append(getState()).append('\n'); }
private void attachNoContentHandler() { AbstractHandler noContentHandler = new NoContentOutputErrorHandler(); // This part is needed to avoid WARN while starting container. noContentHandler.setServer(server); server.addBean(noContentHandler); }
@Override public void setServer(Server server) { if (_server==server) return; if (isStarted()) throw new IllegalStateException(STARTED); _server=server; }
@Override public String getObjectContextBasis() { if (_managed != null ) { String basis = null; if (_managed instanceof ContextHandler) { return null; } else if (_managed instanceof AbstractHandler) { AbstractHandler handler = (AbstractHandler)_managed; Server server = handler.getServer(); if (server != null) { ContextHandler context = AbstractHandlerContainer.findContainerOf(server, ContextHandler.class, handler); if (context != null) basis = getContextName(context); } } if (basis != null) return basis; } return super.getObjectContextBasis(); }
@Override public void destroy() { if (!isStopped()) throw new IllegalStateException("!STOPPED"); super.destroy(); }
@Override public void dumpThis(Appendable out) throws IOException { out.append(toString()).append(" - ").append(getState()).append('\n'); }
private void attachNoContentHandler() { AbstractHandler noContentHandler = new NoContentOutputErrorHandler(); // This part is needed to avoid WARN while starting container. noContentHandler.setServer(server); server.addBean(noContentHandler); }
/** * Inform this container that the server has been started. * This method must be implicitly called after the server containing this container is started. * * @throws java.lang.Exception if a problem occurred during server startup. */ @Override protected void doStart() throws Exception { super.doStart(); appHandler.onStartup(this); }
@Override public void setServer(Server server) { if (_server==server) return; if (isStarted()) throw new IllegalStateException(STARTED); _server=server; }
@Override protected void doStop() throws Exception { this.transport = null; this.logger = null; super.doStop(); }