本文整理了Java中org.eclipse.jetty.server.Server.isStopping()
方法的一些代码示例,展示了Server.isStopping()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Server.isStopping()
方法的具体详情如下:
包路径:org.eclipse.jetty.server.Server
类名称:Server
方法名:isStopping
暂无
代码示例来源:origin: jphp-group/jphp
@Signature
public boolean isStopping() {
return server.isStopping();
}
代码示例来源:origin: 4thline/cling
@Override
synchronized public void stopIfRunning() {
if (!server.isStopped() && !server.isStopping()) {
log.info("Stopping Jetty server...");
try {
server.stop();
} catch (Exception ex) {
log.severe("Couldn't stop Jetty server: " + ex);
throw new RuntimeException(ex);
} finally {
resetServer();
}
}
}
代码示例来源:origin: kingthy/TVRemoteIME
@Override
synchronized public void stopIfRunning() {
if (!server.isStopped() && !server.isStopping()) {
log.info("Stopping Jetty server...");
try {
server.stop();
} catch (Exception ex) {
log.severe("Couldn't stop Jetty server: " + ex);
throw new RuntimeException(ex);
} finally {
resetServer();
}
}
}
代码示例来源:origin: org.wymiwyg/wrhapi-jetty
public void stop() {
try {
server.stop();
int i = 0;
while (server.isStopping()) {
Thread.sleep(10);
if ((i % 100) == 0) {
log.info("waiting for jetty to stop");
}
i++;
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
代码示例来源:origin: kumuluz/kumuluzee
@Override
public void stopServer() {
if (server == null)
throw new IllegalStateException("Jetty has to be initialized before stopping it");
if (server.isStopped() || server.isStopping())
throw new IllegalStateException("Jetty is already stopped");
try {
server.stop();
} catch (Exception e) {
log.severe(e.getMessage());
throw new KumuluzServerException(e.getMessage(), e.getCause());
}
}
代码示例来源:origin: org.fourthline.cling/cling-core
@Override
synchronized public void stopIfRunning() {
if (!server.isStopped() && !server.isStopping()) {
log.info("Stopping Jetty server...");
try {
server.stop();
} catch (Exception ex) {
log.severe("Couldn't stop Jetty server: " + ex);
throw new RuntimeException(ex);
} finally {
resetServer();
}
}
}
代码示例来源:origin: org.apache.juneau/juneau-microservice-server
@Override /* Thread */
public void run() {
try {
if (server == null || server.isStopping() || server.isStopped())
return;
onStopServer();
out(mb2, "StoppingServer");
server.stop();
out(mb2, "ServerStopped");
onPostStopServer();
} catch (Exception e) {
logger.log(Level.WARNING, e.getLocalizedMessage(), e);
}
}
};
代码示例来源:origin: apache/juneau
@Override /* Thread */
public void run() {
try {
if (server == null || server.isStopping() || server.isStopped())
return;
listener.onStopServer(JettyMicroservice.this);
out(mb2, "StoppingServer");
server.stop();
out(mb2, "ServerStopped");
listener.onPostStopServer(JettyMicroservice.this);
} catch (Exception e) {
logger.log(Level.WARNING, e.getLocalizedMessage(), e);
}
}
};
代码示例来源:origin: org.apache.edgent/edgent-console-server
/**
* Checks to see if the server is in a "stopping" or "stopped" state
* @return a boolean: true if the server is stopping or stopped, false otherwise
*/
public boolean isServerStopped() {
if (getJettyServer().isStopping() || getJettyServer().isStopped()) {
return true;
}
else {
return false;
}
}
/**
代码示例来源:origin: apache/incubator-edgent
/**
* Checks to see if the server is in a "stopping" or "stopped" state
* @return a boolean: true if the server is stopping or stopped, false otherwise
*/
public boolean isServerStopped() {
if (getJettyServer().isStopping() || getJettyServer().isStopped()) {
return true;
}
else {
return false;
}
}
/**
内容来源于网络,如有侵权,请联系作者删除!