本文整理匯總了Java中org.apache.catalina.LifecycleState.DESTROYED屬性的典型用法代碼示例。如果您正苦於以下問題:Java LifecycleState.DESTROYED屬性的具體用法?Java LifecycleState.DESTROYED怎麽用?Java LifecycleState.DESTROYED使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.apache.catalina.LifecycleState
的用法示例。
在下文中一共展示了LifecycleState.DESTROYED屬性的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: tearDown
@After
@Override
public void tearDown() throws Exception {
try {
// Some tests may call tomcat.destroy(), some tests may just call
// tomcat.stop(), some not call either method. Make sure that stop()
// & destroy() are called as necessary.
if (tomcat.server != null
&& tomcat.server.getState() != LifecycleState.DESTROYED) {
if (tomcat.server.getState() != LifecycleState.STOPPED) {
tomcat.stop();
}
tomcat.destroy();
}
} finally {
super.tearDown();
}
}
示例2: dismantle
/**
* Dismantles the embedded Tomcat.
* @throws Throwable Throws uncaught throwables for test to fail.
*/
@After
public void dismantle() throws Throwable {
if (testTomcat.getServer() != null && testTomcat.getServer().getState() != LifecycleState.DESTROYED) {
if (testTomcat.getServer().getState() != LifecycleState.STOPPED) {
testTomcat.stop();
}
testTomcat.destroy();
}
}
示例3: dismantle
/**
* Dismantle Tomcat.
*/
@After
public void dismantle() {
try {
if (testTomcat.getServer() != null
&& testTomcat.getServer().getState() != LifecycleState.DESTROYED) {
if (testTomcat.getServer().getState() != LifecycleState.STOPPED) {
testTomcat.stop();
}
testTomcat.destroy();
}
} catch (LifecycleException e) {
System.out.println("Exception shutting down testing Tomcat: " + e.getMessage());
}
}
示例4: dismantle
/**
* Dismantle Tomcat with index.
* @param index The tomcat index.
*/
public void dismantle(int index) {
try {
if (tomcats[index].getServer() != null
&& tomcats[index].getServer().getState() != LifecycleState.DESTROYED) {
if (tomcats[index].getServer().getState() != LifecycleState.STOPPED) {
tomcats[index].stop();
}
tomcats[index].destroy();
}
} catch (LifecycleException e) {
System.out.println("Exception shutting down Testing Tomcat (this may happen a lot): " + e.getMessage());
}
}
示例5: dismantle
/**
* Dismantles the embedded Tomcat.
* @throws Throwable Throws uncaught throwables for test to fail.
*/
@After
public void dismantle() throws Throwable {
if (storeTomcat.getServer() != null && storeTomcat.getServer().getState() != LifecycleState.DESTROYED) {
if (storeTomcat.getServer().getState() != LifecycleState.STOPPED) {
storeTomcat.stop();
}
storeTomcat.destroy();
}
}
示例6: dismantle
/**
* Dismantles the embedded Tomcat.
* @throws Throwable Throws uncaught throwables for test to fail.
*/
@After
public void dismantle() throws Throwable {
if (registryTomcat.getServer() != null && registryTomcat.getServer().getState() != LifecycleState.DESTROYED) {
if (registryTomcat.getServer().getState() != LifecycleState.STOPPED) {
registryTomcat.stop();
}
registryTomcat.destroy();
}
Registry.getRegistryInstance().getHeartbeatMap().clear();
Registry.getRegistryInstance().getMap().clear();
}
示例7: shutDownTomcat
public static void shutDownTomcat() throws LifecycleException {
if (tomcat.getServer() != null
&& tomcat.getServer().getState() != LifecycleState.DESTROYED) {
if (tomcat.getServer().getState() != LifecycleState.STOPPED) {
tomcat.stop();
}
tomcat.destroy();
}
}