annotate src/org/eclipse/jetty/server/handler/ShutdownHandler.java @ 1016:8c13b9224cff

remove returnBuffer()
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 24 Oct 2016 01:38:00 -0600
parents 32d4b569567c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
1 //
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
2 // ========================================================================
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
3 // Copyright (c) 1995-2014 Mort Bay Consulting Pty. Ltd.
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
4 // ------------------------------------------------------------------------
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
5 // All rights reserved. This program and the accompanying materials
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
6 // are made available under the terms of the Eclipse Public License v1.0
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
7 // and Apache License v2.0 which accompanies this distribution.
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
8 //
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
9 // The Eclipse Public License is available at
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
10 // http://www.eclipse.org/legal/epl-v10.html
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
11 //
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
12 // The Apache License v2.0 is available at
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
13 // http://www.opensource.org/licenses/apache2.0.php
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
14 //
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
15 // You may elect to redistribute this code under either of these licenses.
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
16 // ========================================================================
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
17 //
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
18
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
19 package org.eclipse.jetty.server.handler;
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
20
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
21 import java.io.IOException;
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
22
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
23 import javax.servlet.ServletException;
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
24 import javax.servlet.http.HttpServletResponse;
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
25
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
26 import org.eclipse.jetty.server.Request;
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
27 import org.eclipse.jetty.server.Server;
820
8e9db0bbf4f9 remove org.eclipse.jetty.util.log and upgrade slf4j
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
28 import org.slf4j.Logger;
8e9db0bbf4f9 remove org.eclipse.jetty.util.log and upgrade slf4j
Franklin Schmidt <fschmidt@gmail.com>
parents: 802
diff changeset
29 import org.slf4j.LoggerFactory;
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
30
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
31 /* ------------------------------------------------------------ */
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
32 /**
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
33 * A handler that shuts the server down on a valid request. Used to do "soft" restarts from Java. If _exitJvm ist set to true a hard System.exit() call is being
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
34 * made.
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
35 *
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
36 * This handler is a contribution from Johannes Brodwall: https://bugs.eclipse.org/bugs/show_bug.cgi?id=357687
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
37 *
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
38 * Usage:
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
39 *
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
40 * <pre>
1000
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
41 Server server = new Server(8080);
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
42 HandlerList handlers = new HandlerList();
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
43 handlers.setHandlers(new Handler[]
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
44 { someOtherHandler, new ShutdownHandler(server,&quot;secret password&quot;) });
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
45 server.setHandler(handlers);
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
46 server.start();
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
47 </pre>
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
48 *
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
49 <pre>
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
50 public static void attemptShutdown(int port, String shutdownCookie) {
1000
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
51 try {
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
52 URL url = new URL("http://localhost:" + port + "/shutdown?token=" + shutdownCookie);
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
53 HttpURLConnection connection = (HttpURLConnection)url.openConnection();
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
54 connection.setRequestMethod("POST");
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
55 connection.getResponseCode();
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
56 logger.info("Shutting down " + url + ": " + connection.getResponseMessage());
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
57 } catch (SocketException e) {
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
58 logger.debug("Not running");
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
59 // Okay - the server is not running
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
60 } catch (IOException e) {
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
61 throw new RuntimeException(e);
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
62 }
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
63 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
64 </pre>
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
65 */
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
66 public class ShutdownHandler extends AbstractHandler
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
67 {
1000
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
68 private static final Logger LOG = LoggerFactory.getLogger(ShutdownHandler.class);
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
69
1000
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
70 private final String _shutdownToken;
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
71
1000
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
72 private final Server _server;
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
73
1000
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
74 private boolean _exitJvm = false;
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
75
1000
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
76
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
77
1000
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
78 /**
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
79 * Creates a listener that lets the server be shut down remotely (but only from localhost).
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
80 *
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
81 * @param server
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
82 * the Jetty instance that should be shut down
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
83 * @param shutdownToken
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
84 * a secret password to avoid unauthorized shutdown attempts
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
85 */
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
86 public ShutdownHandler(Server server, String shutdownToken)
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
87 {
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
88 this._server = server;
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
89 this._shutdownToken = shutdownToken;
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
90 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
91
1000
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
92 @Override
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
93 public void handle(String target, Request request, HttpServletResponse response) throws IOException, ServletException
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
94 {
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
95 if (!target.equals("/shutdown"))
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
96 {
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
97 return;
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
98 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
99
1000
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
100 if (!request.getMethod().equals("POST"))
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
101 {
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
102 response.sendError(HttpServletResponse.SC_BAD_REQUEST);
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
103 return;
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
104 }
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
105 if (!hasCorrectSecurityToken(request))
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
106 {
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
107 LOG.warn("Unauthorized shutdown attempt from " + getRemoteAddr(request));
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
108 response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
109 return;
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
110 }
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
111 if (!requestFromLocalhost(request))
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
112 {
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
113 LOG.warn("Unauthorized shutdown attempt from " + getRemoteAddr(request));
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
114 response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
115 return;
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
116 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
117
1000
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
118 LOG.info("Shutting down by request from " + getRemoteAddr(request));
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
119
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
120 new Thread()
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
121 {
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
122 public void run ()
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
123 {
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
124 try
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
125 {
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
126 shutdownServer();
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
127 }
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
128 catch (InterruptedException e)
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
129 {
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
130 LOG.trace("",e);
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
131 }
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
132 catch (Exception e)
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
133 {
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
134 throw new RuntimeException("Shutting down server",e);
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
135 }
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
136 }
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
137 }.start();
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
138 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
139
1000
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
140 private boolean requestFromLocalhost(Request request)
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
141 {
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
142 return "127.0.0.1".equals(getRemoteAddr(request));
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
143 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
144
1000
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
145 protected String getRemoteAddr(Request request)
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
146 {
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
147 return request.getRemoteAddr();
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
148 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
149
1000
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
150 private boolean hasCorrectSecurityToken(Request request)
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
151 {
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
152 return _shutdownToken.equals(request.getParameter("token"));
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
153 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
154
1000
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
155 private void shutdownServer() throws Exception
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
156 {
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
157 _server.stop();
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
158
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
159 if (_exitJvm)
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
160 {
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
161 System.exit(0);
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
162 }
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
163 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
164
1000
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
165 public void setExitJvm(boolean exitJvm)
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
166 {
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
167 this._exitJvm = exitJvm;
32d4b569567c simplify handle()
Franklin Schmidt <fschmidt@gmail.com>
parents: 820
diff changeset
168 }
802
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
169
3428c60d7cfc replace jetty jars with source
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
170 }