本文整理了Java中org.mortbay.jetty.Server.isStarting()
方法的一些代码示例,展示了Server.isStarting()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Server.isStarting()
方法的具体详情如下:
包路径:org.mortbay.jetty.Server
类名称:Server
方法名:isStarting
暂无
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
/**
* @param contextPath The _contextPath to set.
*/
public void setContextPath(String contextPath)
{
if (contextPath!=null && contextPath.length()>1 && contextPath.endsWith("/"))
throw new IllegalArgumentException("ends with /");
_contextPath = contextPath;
if (getServer()!=null && (getServer().isStarting() || getServer().isStarted()))
{
Handler[] contextCollections = getServer().getChildHandlersByClass(ContextHandlerCollection.class);
for (int h=0;contextCollections!=null&& h<contextCollections.length;h++)
((ContextHandlerCollection)contextCollections[h]).mapContexts();
}
}
代码示例来源:origin: net.disy.legato/legato-testing
public void start() throws IllegalStateException, Exception {
if (server.isStarted()) {
// initializeApplicationContext();
}
else if (server.isStarting()) {
waitUntilStarted();
// initializeApplicationContext();
}
else if (server.isStopping()) {
waitUntilStopped();
doStart();
}
else if (server.isFailed()) {
throw new IllegalStateException("Could not start a server which has failed."); //$NON-NLS-1$
}
else {
doStart();
}
}
代码示例来源:origin: net.disy.legato/legato-testing
public void stop() throws Exception {
if (server.isStopped()) {
// Nothing to do
}
else if (server.isStarting()) {
waitUntilStarted();
doStop();
}
else if (server.isStarted()) {
doStop();
}
else if (server.isStopping()) {
waitUntilStopped();
}
else if (server.isFailed()) {
throw new IllegalStateException("Could not stop a server which has failed.");
}
else {
doStop();
}
}
内容来源于网络,如有侵权,请联系作者删除!