public interface ThreadEventNotifier
Note: prior to release 1.1.1, the ThreadEventNotifier implementation would retain the listeners
after fireThreadCleanup()
, which could allow certain threads to retain a reference to a
listener, and thus that listener's class loader, even after the an application redeployment,
resulting in a massive memory leak. Starting with release 1.1.1, all listeners are discarded by
fireThreadCleanup()
.
Modifier and Type | Method and Description |
---|---|
void |
addThreadCleanupListener(ThreadCleanupListener listener)
Adds the listener.
|
void |
fireThreadCleanup()
Invokes
ThreadCleanupListener.threadDidCleanup() on all listeners, and discards the
list of listeners. |
void |
removeThreadCleanupListener(ThreadCleanupListener listener)
Removes the listener, if it has been previously added.
|
void addThreadCleanupListener(ThreadCleanupListener listener)
fireThreadCleanup()
is
invoked, at which point is discarded.void removeThreadCleanupListener(ThreadCleanupListener listener)
fireThreadCleanup()
.void fireThreadCleanup()
ThreadCleanupListener.threadDidCleanup()
on all listeners, and discards the
list of listeners.