diff src/org/eclipse/jetty/server/Server.java @ 879:a3775d0c6985

remove ShutdownThread
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 04 Oct 2016 15:55:02 -0600
parents 5f8a242392da
children 00b3bd6e0ada
line wrap: on
line diff
--- a/src/org/eclipse/jetty/server/Server.java	Tue Oct 04 14:50:32 2016 -0600
+++ b/src/org/eclipse/jetty/server/Server.java	Tue Oct 04 15:55:02 2016 -0600
@@ -44,7 +44,6 @@
 import org.eclipse.jetty.util.component.LifeCycle;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.eclipse.jetty.util.thread.ShutdownThread;
 
 /* ------------------------------------------------------------ */
 /** Jetty HTTP Servlet Server.
@@ -65,7 +64,6 @@
 	public final ThreadPoolExecutor threadPool;
 	public final Connector connector;
 	private int _graceful=0;
-	private boolean _stopAtShutdown;
 	private boolean _dumpAfterStart=false;
 	private boolean _dumpBeforeStop=false;
 	private boolean _uncheckedPrintWriter=false;
@@ -93,32 +91,6 @@
 		return __version;
 	}
 
-	/* ------------------------------------------------------------ */
-	public boolean getStopAtShutdown()
-	{
-		return _stopAtShutdown;
-	}
-
-	/* ------------------------------------------------------------ */
-	public void setStopAtShutdown(boolean stop)
-	{
-		//if we now want to stop
-		if (stop)
-		{
-			//and we weren't stopping before
-			if (!_stopAtShutdown)
-			{  
-				//only register to stop if we're already started (otherwise we'll do it in doStart())
-				if (isStarted()) 
-					ShutdownThread.register(this);
-			}
-		}
-		else
-			ShutdownThread.deregister(this);
-		
-		_stopAtShutdown=stop;
-	}
-
 	/**
 	 * @return true if {@link #dumpStdErr()} is called after starting
 	 */
@@ -157,13 +129,6 @@
 	@Override
 	protected void doStart() throws Exception
 	{
-		if (getStopAtShutdown())
-		{
-			ShutdownThread.register(this);    
-		}
-		
-		ShutdownMonitor.getInstance().start(); // initialize
-
 		LOG.info("jetty-"+__version);
 		HttpGenerator.setServerVersion(__version);
 		
@@ -224,9 +189,6 @@
 		try {super.doStop(); } catch(Throwable e) { mex.add(e);}
 
 		mex.ifExceptionThrow();
-
-		if (getStopAtShutdown())
-			ShutdownThread.deregister(this);
 	}
 
 	/* ------------------------------------------------------------ */