当前位置: 首页>>代码示例>>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;未经允许,请勿转载。