Package org.eclipse.net4j.util.lifecycle
Class LifecycleUtil
java.lang.Object
org.eclipse.net4j.util.lifecycle.LifecycleUtil
Various static helper methods for dealing with
lifecycles
.- Author:
- Eike Stepper
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic @interface
Annotates a method of a POJO class that's supposed to be called to activate a POJO object duringactivate(Object)
.static @interface
Annotates a method of a POJO class that's supposed to be called to deactivate a POJO object duringdeactivate(Object)
.static final class
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
static void
static Exception
activateSilent
(Object object) static Exception
activateSilent
(Object object, boolean useAnnotation) static void
checkActive
(Object object) static void
checkInactive
(Object object) static Exception
deactivate
(Object object) static Exception
deactivate
(Object object, boolean useAnnotation) static void
deactivate
(Object object, OMLogger.Level logLevel) static void
deactivateNoisy
(Object object) static void
deactivateNoisy
(Object object, boolean useAnnotation) static Exception
deactivateSilent
(Object object) static <T> T
delegateLifecycle
(ClassLoader loader, T pojo, Class<?> pojoInterface, ILifecycle delegate) static <T> T
delegateLifecycle
(ClassLoader loader, T pojo, ILifecycle delegate) static LifecycleState
getLifecycleState
(Object object) static int
getRefCount
(Object object) static boolean
static boolean
isDeferredActivation
(Object object) static boolean
waitFor
(Object object, long millis, LifecycleState state) static boolean
waitForActive
(Object object, long millis) static boolean
waitForInactive
(Object object, long millis) static void
withoutChecks
(Runnable runnable)
-
Method Details
-
getRefCount
- Since:
- 3.5
-
getLifecycleState
- Since:
- 3.0
-
isDeferredActivation
- Since:
- 3.2
-
isActive
-
checkActive
- Throws:
LifecycleException
- Since:
- 2.0
-
checkInactive
- Throws:
LifecycleException
- Since:
- 2.0
-
withoutChecks
- Since:
- 3.17
-
activate
- Throws:
LifecycleException
-
activate
- Throws:
LifecycleException
- See Also:
-
activateSilent
-
activateSilent
- See Also:
-
waitForActive
-
waitForInactive
- Since:
- 3.1
-
waitFor
- Since:
- 3.1
-
deactivate
-
deactivate
- See Also:
-
deactivate
- Since:
- 2.0
-
deactivateSilent
- Since:
- 3.26
-
deactivateNoisy
- Throws:
LifecycleException
-
deactivateNoisy
- Throws:
LifecycleException
-
delegateLifecycle
public static <T> T delegateLifecycle(ClassLoader loader, T pojo, Class<?> pojoInterface, ILifecycle delegate) - Since:
- 2.0
-
delegateLifecycle
- Since:
- 2.0
-