public final class LifecycleUtil extends Object
lifecycles
.Modifier and Type | Class and Description |
---|---|
static interface |
LifecycleUtil.Activator
Annotates a method of a POJO class that's supposed to be called to activate a POJO object during
activate(Object) . |
static interface |
LifecycleUtil.Deactivator
Annotates a method of a POJO class that's supposed to be called to deactivate a POJO object during
deactivate(Object) . |
static class |
LifecycleUtil.Delegator<T>
|
Modifier and Type | Method and Description |
---|---|
static void |
activate(Object object) |
static void |
activate(Object object,
boolean useAnnotation) |
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 <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 |
isActive(Object object) |
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) |
public static int getRefCount(Object object)
public static LifecycleState getLifecycleState(Object object)
public static boolean isDeferredActivation(Object object)
public static boolean isActive(Object object)
public static void checkActive(Object object) throws LifecycleException
LifecycleException
public static void checkInactive(Object object) throws LifecycleException
LifecycleException
public static void activate(Object object) throws LifecycleException
LifecycleException
public static void activate(Object object, boolean useAnnotation) throws LifecycleException
LifecycleException
LifecycleUtil.Activator
public static Exception activateSilent(Object object, boolean useAnnotation)
LifecycleUtil.Activator
public static boolean waitForActive(Object object, long millis)
public static boolean waitForInactive(Object object, long millis)
public static boolean waitFor(Object object, long millis, LifecycleState state)
public static Exception deactivate(Object object, boolean useAnnotation)
LifecycleUtil.Deactivator
public static void deactivate(Object object, OMLogger.Level logLevel)
public static void deactivateNoisy(Object object) throws LifecycleException
LifecycleException
public static void deactivateNoisy(Object object, boolean useAnnotation) throws LifecycleException
LifecycleException
public static <T> T delegateLifecycle(ClassLoader loader, T pojo, Class<?> pojoInterface, ILifecycle delegate)
public static <T> T delegateLifecycle(ClassLoader loader, T pojo, ILifecycle delegate)
Copyright (c) 2011-2015 Eike Stepper (Berlin, Germany) and others.