當前位置: 首頁>>代碼示例>>Java>>正文


Java LifecycleState.DESTROYED屬性代碼示例

本文整理匯總了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();
    }
}
 
開發者ID:liaokailin,項目名稱:tomcat7,代碼行數:18,代碼來源:TomcatBaseTest.java

示例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();
    }
}
 
開發者ID:DescartesResearch,項目名稱:Pet-Supply-Store,代碼行數:13,代碼來源:RegistryTest.java

示例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());
	}
}
 
開發者ID:DescartesResearch,項目名稱:Pet-Supply-Store,代碼行數:17,代碼來源:AbstractRecommenderRestTest.java

示例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());
	}
}
 
開發者ID:DescartesResearch,項目名稱:Pet-Supply-Store,代碼行數:17,代碼來源:TomcatTestHandler.java

示例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();
    }
}
 
開發者ID:DescartesResearch,項目名稱:Pet-Supply-Store,代碼行數:13,代碼來源:AbstractStoreRestTest.java

示例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();
}
 
開發者ID:DescartesResearch,項目名稱:Pet-Supply-Store,代碼行數:15,代碼來源:HeartbeatTest.java

示例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();
    }
}
 
開發者ID:nlighten,項目名稱:tomcat_exporter,代碼行數:9,代碼來源:AbstractTomcatMetricsTest.java


注:本文中的org.apache.catalina.LifecycleState.DESTROYED屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。