private void checkConnectorHasStarted(Connector connector) { if (LifecycleState.FAILED.equals(connector.getState())) { throw new ConnectorStartFailedException(connector.getPort()); } }
private void rethrowDeferredStartupExceptions() throws Exception { Container[] children = this.tomcat.getHost().findChildren(); for (Container container : children) { if (container instanceof TomcatEmbeddedContext) { TomcatStarter tomcatStarter = ((TomcatEmbeddedContext) container) .getStarter(); if (tomcatStarter != null) { Exception exception = tomcatStarter.getStartUpException(); if (exception != null) { throw exception; } } } if (!LifecycleState.STARTED.equals(container.getState())) { throw new IllegalStateException(container + " failed to start"); } } }
/** {@inheritDoc} * @throws LifecycleException */ protected synchronized void setState(LifecycleState state, Object data) throws LifecycleException { super.setState(state, data); if (LifecycleState.STARTED.equals(state)) { logger.info("{} started.", getName()); } }
/** {@inheritDoc} * @throws LifecycleException */ protected synchronized void setState(final LifecycleState state, final Object data) throws LifecycleException { super.setState(state, data); if (LifecycleState.STARTED.equals(state)) { logger.info("{} started.", getName()); } }
/** {@inheritDoc} */ protected synchronized void setState(LifecycleState state, Object data) { super.setState(state, data); if (LifecycleState.STARTED.equals(state)) { logger.info("{} started.", getName()); } }
@Override public void setDomain(String domain) { if (!context.getState().equals(LifecycleState.STARTING_PREP)) { throw new IllegalStateException(sm.getString( "applicationSessionCookieConfig.ise", "domain name", context.getPath())); } this.domain = domain; }
@Override public void setComment(String comment) { if (!context.getState().equals(LifecycleState.STARTING_PREP)) { throw new IllegalStateException(sm.getString( "applicationSessionCookieConfig.ise", "comment", context.getPath())); } this.comment = comment; }
@Override public void setHttpOnly(boolean httpOnly) { if (!context.getState().equals(LifecycleState.STARTING_PREP)) { throw new IllegalStateException(sm.getString( "applicationSessionCookieConfig.ise", "HttpOnly", context.getPath())); } this.httpOnly = httpOnly; }
@Override public void setPath(String path) { if (!context.getState().equals(LifecycleState.STARTING_PREP)) { throw new IllegalStateException(sm.getString( "applicationSessionCookieConfig.ise", "path", context.getPath())); } this.path = path; }
@Override public void setSecure(boolean secure) { if (!context.getState().equals(LifecycleState.STARTING_PREP)) { throw new IllegalStateException(sm.getString( "applicationSessionCookieConfig.ise", "secure", context.getPath())); } this.secure = secure; }
@Override public void setMaxAge(int maxAge) { if (!context.getState().equals(LifecycleState.STARTING_PREP)) { throw new IllegalStateException(sm.getString( "applicationSessionCookieConfig.ise", "max age", context.getPath())); } this.maxAge = maxAge; }
@Override public void setName(String name) { if (!context.getState().equals(LifecycleState.STARTING_PREP)) { throw new IllegalStateException(sm.getString( "applicationSessionCookieConfig.ise", "name", context.getPath())); } this.name = name; }
@Override public void setName(String name) { if (!context.getState().equals(LifecycleState.STARTING_PREP)) { throw new IllegalStateException(sm.getString( "applicationSessionCookieConfig.ise", "name", context.getPath())); } this.name = name; }
@Override public void setPath(String path) { if (!context.getState().equals(LifecycleState.STARTING_PREP)) { throw new IllegalStateException(sm.getString( "applicationSessionCookieConfig.ise", "path", context.getPath())); } this.path = path; }
@Override public void setComment(String comment) { if (!context.getState().equals(LifecycleState.STARTING_PREP)) { throw new IllegalStateException(sm.getString( "applicationSessionCookieConfig.ise", "comment", context.getPath())); } this.comment = comment; }
@Override public void setDomain(String domain) { if (!context.getState().equals(LifecycleState.STARTING_PREP)) { throw new IllegalStateException(sm.getString( "applicationSessionCookieConfig.ise", "domain name", context.getPath())); } this.domain = domain; }
@Override public void setSecure(boolean secure) { if (!context.getState().equals(LifecycleState.STARTING_PREP)) { throw new IllegalStateException(sm.getString( "applicationSessionCookieConfig.ise", "secure", context.getPath())); } this.secure = secure; }
@Override public void setResponseCharacterEncoding(String encoding) { if (!context.getState().equals(LifecycleState.STARTING_PREP)) { throw new IllegalStateException( sm.getString("applicationContext.setResponseEncoding.ise", getContextPath())); } context.setResponseCharacterEncoding(encoding); }
@Override public void setSessionTimeout(int sessionTimeout) { if (!context.getState().equals(LifecycleState.STARTING_PREP)) { throw new IllegalStateException( sm.getString("applicationContext.setSessionTimeout.ise", getContextPath())); } context.setSessionTimeout(sessionTimeout); }
@Override public void setRequestCharacterEncoding(String encoding) { if (!context.getState().equals(LifecycleState.STARTING_PREP)) { throw new IllegalStateException( sm.getString("applicationContext.setRequestEncoding.ise", getContextPath())); } context.setRequestCharacterEncoding(encoding); }