Debian Codegraph @

src/test/org/h2/samples/ShutdownServer.java

raw
1 /*
2 * Copyright 2004-2023 H2 Group. Multiple-Licensed under the MPL 2.0,
3 * and the EPL 1.0 (https://h2database.com/html/license.html).
4 * Initial Developer: H2 Group
5 */
6 package org.h2.samples;
7
8 import java.sql.SQLException;
9
10 /**
11 * This very simple sample application stops a H2 TCP server
12 * if it is running.
13 */
14 public class ShutdownServer {
15
16 /**
17 * This method is called when executing this sample application from the
18 * command line.
19 *
20 * @param args the command line parameters
21 * @throws SQLException on failure
22 */
23 public static void main(String... args) throws SQLException {
24 org.h2.tools.Server.shutdownTcpServer("tcp://localhost:9094", "", false, false);
25 }
26 }