org.h2.server.web.WebServer.shutdown()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(121)

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

WebServer.shutdown介绍

[英]Shut down the web server.
[中]关闭web服务器。

代码示例

代码示例来源:origin: com.h2database/h2

/**
 * Stop the application and the server.
 *
 * @return the page to display
 */
protected String adminShutdown() {
  server.shutdown();
  return "admin.jsp";
}

代码示例来源:origin: com.h2database/h2

private String logout() {
  try {
    Connection conn = session.getConnection();
    session.setConnection(null);
    session.remove("conn");
    session.remove("result");
    session.remove("tables");
    session.remove("user");
    session.remove("tool");
    if (conn != null) {
      if (session.getShutdownServerOnDisconnect()) {
        server.shutdown();
      } else {
        conn.close();
      }
    }
  } catch (Exception e) {
    trace(e.toString());
  }
  return "index.do";
}

代码示例来源:origin: com.eventsourcing/h2

/**
 * Stop the application and the server.
 *
 * @return the page to display
 */
protected String adminShutdown() {
  server.shutdown();
  return "admin.jsp";
}

代码示例来源:origin: com.h2database/com.springsource.org.h2

private String adminShutdown() {
  server.shutdown();
  return "admin.jsp";
}

代码示例来源:origin: org.wowtools/h2

/**
 * Stop the application and the server.
 *
 * @return the page to display
 */
protected String adminShutdown() {
  server.shutdown();
  return "admin.jsp";
}

代码示例来源:origin: org.wowtools/h2

private String logout() {
  try {
    Connection conn = session.getConnection();
    session.setConnection(null);
    session.remove("conn");
    session.remove("result");
    session.remove("tables");
    session.remove("user");
    session.remove("tool");
    if (conn != null) {
      if (session.getShutdownServerOnDisconnect()) {
        server.shutdown();
      } else {
        conn.close();
      }
    }
  } catch (Exception e) {
    trace(e.toString());
  }
  return "index.do";
}

代码示例来源:origin: com.eventsourcing/h2

private String logout() {
  try {
    Connection conn = session.getConnection();
    session.setConnection(null);
    session.remove("conn");
    session.remove("result");
    session.remove("tables");
    session.remove("user");
    session.remove("tool");
    if (conn != null) {
      if (session.getShutdownServerOnDisconnect()) {
        server.shutdown();
      } else {
        conn.close();
      }
    }
  } catch (Exception e) {
    trace(e.toString());
  }
  return "index.do";
}

相关文章