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
,DriverManagerLeakPreventer
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, AbstractLifeCycle.StopException
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
doStart()
Method to override to start the lifecycleabstract void
prevent
(ClassLoader loader) Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addEventListener, doStop, getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, setEventListeners, start, stop, toString
-
Constructor Details
-
AbstractLeakPreventer
public AbstractLeakPreventer()
-
-
Method Details
-
prevent
-
doStart
Description copied from class:AbstractLifeCycle
Method to override to start the lifecycle- Overrides:
doStart
in classAbstractLifeCycle
- Throws:
AbstractLifeCycle.StopException
- If thrown, the lifecycle will immediately be stopped.Exception
- If there was a problem starting. Will cause a transition to FAILED state
-