org.eclipse.jetty.util.preventers

## Class AbstractLeakPreventer

- java.lang.Object
- - org.eclipse.jetty.util.component.AbstractLifeCycle
  - - org.eclipse.jetty.util.preventers.AbstractLeakPreventer

- All Implemented Interfaces:
    LifeCycle
  Direct Known Subclasses:
    AppContextLeakPreventer, AWTLeakPreventer, DOMLeakPreventer, DriverManagerLeakPreventer, GCThreadLeakPreventer, Java2DLeakPreventer, LDAPLeakPreventer, LoginConfigurationLeakPreventer, SecurityProviderLeakPreventer

      public abstract class AbstractLeakPreventer
      extends AbstractLifeCycle

  AbstractLeakPreventer Abstract base class for code that seeks to avoid pinning of webapp classloaders by using the jetty classloader to proactively call the code that pins them (generally pinned as static data members, or as static data members that are daemon threads (which use the context classloader)). Instances of subclasses of this class should be set with Server.addBean(), which will ensure that they are called when the Server instance starts up, which will have the jetty classloader in scope.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

      `AbstractLifeCycle.AbstractLifeCycleListener`

    - ### Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle

      `LifeCycle.Listener`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static Logger` | `LOG`

    - ### Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

      `_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractLeakPreventer()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `doStart()`
    `abstract void` | `prevent(ClassLoader loader)`

    - ### Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

      `addLifeCycleListener, doStop, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### LOG

          protected static final Logger LOG

  - ### Constructor Detail

    - #### AbstractLeakPreventer

          public AbstractLeakPreventer()

  - ### Method Detail

    - #### prevent

          public abstract void prevent(ClassLoader loader)

    - #### doStart

          protected void doStart()
                          throws Exception

      Overrides:
        `doStart` in class `AbstractLifeCycle`
      Throws:
        `Exception`

Copyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.