diff src/org/eclipse/jetty/server/handler/AbstractHandler.java @ 848:22a4e93ed20e

remove Container
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 19 Sep 2016 16:38:36 -0600
parents 8e9db0bbf4f9
children
line wrap: on
line diff
--- a/src/org/eclipse/jetty/server/handler/AbstractHandler.java	Mon Sep 19 16:11:15 2016 -0600
+++ b/src/org/eclipse/jetty/server/handler/AbstractHandler.java	Mon Sep 19 16:38:36 2016 -0600
@@ -35,71 +35,64 @@
  */
 public abstract class AbstractHandler extends AggregateLifeCycle implements Handler
 {
-    private static final Logger LOG = LoggerFactory.getLogger(AbstractHandler.class);
-
-    private Server _server;
-    
-    /* ------------------------------------------------------------ */
-    /**
-     * 
-     */
-    public AbstractHandler()
-    {
-    }
+	private static final Logger LOG = LoggerFactory.getLogger(AbstractHandler.class);
 
-    /* ------------------------------------------------------------ */
-    /* 
-     * @see org.eclipse.thread.LifeCycle#start()
-     */
-    @Override
-    protected void doStart() throws Exception
-    {
-        LOG.debug("starting {}",this);
-        super.doStart();
-    }
+	private Server _server;
+	
+	/* ------------------------------------------------------------ */
+	/**
+	 * 
+	 */
+	public AbstractHandler()
+	{
+	}
 
-    /* ------------------------------------------------------------ */
-    /* 
-     * @see org.eclipse.thread.LifeCycle#stop()
-     */
-    @Override
-    protected void doStop() throws Exception
-    {
-        LOG.debug("stopping {}",this);
-        super.doStop();
-    }
+	/* ------------------------------------------------------------ */
+	/* 
+	 * @see org.eclipse.thread.LifeCycle#start()
+	 */
+	@Override
+	protected void doStart() throws Exception
+	{
+		LOG.debug("starting {}",this);
+		super.doStart();
+	}
 
-    /* ------------------------------------------------------------ */
-    public void setServer(Server server)
-    {
-        Server old_server=_server;
-        if (old_server!=null && old_server!=server)
-            old_server.getContainer().removeBean(this);
-        _server=server;
-        if (_server!=null && _server!=old_server)
-            _server.getContainer().addBean(this);
-    }
+	/* ------------------------------------------------------------ */
+	/* 
+	 * @see org.eclipse.thread.LifeCycle#stop()
+	 */
+	@Override
+	protected void doStop() throws Exception
+	{
+		LOG.debug("stopping {}",this);
+		super.doStop();
+	}
 
-    /* ------------------------------------------------------------ */
-    public Server getServer()
-    {
-        return _server;
-    }
+	/* ------------------------------------------------------------ */
+	public void setServer(Server server)
+	{
+		_server=server;
+	}
 
-    /* ------------------------------------------------------------ */
-    public void destroy()
-    {
-        if (!isStopped())
-            throw new IllegalStateException("!STOPPED");
-        super.destroy();
-        if (_server!=null)
-            _server.getContainer().removeBean(this);
-    }
+	/* ------------------------------------------------------------ */
+	public Server getServer()
+	{
+		return _server;
+	}
 
-    /* ------------------------------------------------------------ */
-    public void dumpThis(Appendable out) throws IOException
-    {
-        out.append(toString()).append(" - ").append(getState()).append('\n');
-    }
-    
+	/* ------------------------------------------------------------ */
+	public void destroy()
+	{
+		if (!isStopped())
+			throw new IllegalStateException("!STOPPED");
+		super.destroy();
+	}
+
+	/* ------------------------------------------------------------ */
+	public void dumpThis(Appendable out) throws IOException
+	{
+		out.append(toString()).append(" - ").append(getState()).append('\n');
+	}
+	
 }