Class WeakTimerTask<T>
- java.lang.Object
-
- java.util.TimerTask
-
- eu.emi.security.authn.x509.helpers.WeakTimerTask<T>
-
- All Implemented Interfaces:
java.lang.Runnable
public abstract class WeakTimerTask<T> extends java.util.TimerTask
This class holds a partner of the TimerTask reference as weak one. This allows to have weak association: the partner's object can be disposed without being blocked by a strong reference of the timer.IMPORTANT! Never use this class as base for an inner or anonymous class. This will create an implicit strong reference to the wrapping partner, so it won't be disposed until the timer task is cancelled.
- Author:
- K. Benedyczak
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.ref.WeakReference<T>
partnerRef
-
Constructor Summary
Constructors Constructor Description WeakTimerTask(T partner)
-