org.apache.catalina.Server.await()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(3.3k)|赞(0)|评价(0)|浏览(100)

本文整理了Java中org.apache.catalina.Server.await()方法的一些代码示例,展示了Server.await()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Server.await()方法的具体详情如下:
包路径:org.apache.catalina.Server
类名称:Server
方法名:await

Server.await介绍

[英]Wait until a proper shutdown command is received, then return.
[中]等待收到正确的关机命令,然后返回。

代码示例

代码示例来源:origin: SonarSource/sonarqube

void awaitTermination() {
  tomcat.getServer().await();
 }
}

代码示例来源:origin: OryxProject/oryx

/**
 * Blocks and waits until the server shuts down.
 */
public void await() {
 Server server;
 synchronized (this) {
  server = tomcat.getServer();
 }
 server.await(); // Can't do this with lock held
}

代码示例来源:origin: org.springframework.boot/spring-boot

@Override
public void run() {
  TomcatWebServer.this.tomcat.getServer().await();
}

代码示例来源:origin: pippo-java/pippo

tomcat.getServer().await();

代码示例来源:origin: org.glassfish.main.web/web-core

/**
 * Await and shutdown.
 */
public void await() {
  server.await();
}

代码示例来源:origin: tomcat/catalina

/**
 * Await and shutdown.
 */
public void await() {
  server.await();
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * Await and shutdown.
 */
public void await() {
  getServer().await();
}

代码示例来源:origin: codefollower/Tomcat-Research

/**
 * Await and shutdown.
 */
public void await() {
  getServer().await();
}

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

/**
 * Await and shutdown.
 */
public void await() {
  getServer().await();
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

/**
 * Await and shutdown.
 */
public void await() {
  getServer().await();
}

代码示例来源:origin: org.dbflute.tomcat/tomcat-boot

public void await() { // public as parts
  if (server == null) {
    throw new IllegalStateException("server has not been started.");
  }
  try {
    server.getServer().await();
  } catch (Exception e) {
    throw new IllegalStateException("server join failed.", e);
  }
}

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

/**
 * Await and shutdown.
 */
public void await() {
  getServer().await();
}

代码示例来源:origin: nutzam/nutzboot

@Override
  public void run() {
    TomcatStarter.this.tomcat.getServer().await();
  }
};

代码示例来源:origin: myrrix/myrrix-recommender

/**
 * Blocks and waits until the server shuts down.
 */
public void await() {
 tomcat.getServer().await();
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * Await and shutdown.
 */
public void await() {
  getServer().await();
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

/**
 * Await and shutdown.
 */
public void await() {
  getServer().await();
}

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

/**
 * Await and shutdown.
 */
public void await() {
  getServer().await();
}

代码示例来源:origin: com.brienwheeler.apps/apps-tomcat

@Override
public void destroy() throws Exception
{
  tomcat.stop();
  tomcat.getServer().await();
}

代码示例来源:origin: fabric8io/shootout-docker-maven

public static void main(String[] args) throws LifecycleException, SQLException {
  Tomcat tomcat = new Tomcat();
  tomcat.setPort(8080);
  File base = new File(System.getProperty("java.io.tmpdir"));
  Context rootCtx = tomcat.addContext("/", base.getAbsolutePath());
  Tomcat.addServlet(rootCtx, "log", new LogService());
  rootCtx.addServletMapping("/*", "log");
  tomcat.start();
  tomcat.getServer().await();
}

代码示例来源:origin: zzzzbw/doodle

@Override
public void startServer() throws Exception {
  tomcat.start();
  String address = tomcat.getServer().getAddress();
  int port = tomcat.getConnector().getPort();
  log.info("local address: http://{}:{}", address, port);
  tomcat.getServer().await();
}

相关文章