org.eclipse.net4j.util.lifecycle
Class Lifecycle
java.lang.Object
org.eclipse.net4j.util.event.Notifier
org.eclipse.net4j.util.lifecycle.Lifecycle
- All Implemented Interfaces:
- INotifier, ILifecycle, ILifecycle.DeferrableActivation
- Direct Known Subclasses:
- Container, FiniteStateMachine, ManagedContainer, Randomizer, RWLockManager, RWOLockManager, UserManager, Worker
- public class Lifecycle
- extends Notifier
- implements ILifecycle, ILifecycle.DeferrableActivation
A default implementation of an entity with a lifecycle
.
USE_LABEL
public static boolean USE_LABEL
Lifecycle
public Lifecycle()
- Since:
- 2.0
activate
public final void activate()
throws LifecycleException
- Specified by:
activate
in interface ILifecycle
- Throws:
LifecycleException
deactivate
public final Exception deactivate()
- Specified by:
deactivate
in interface ILifecycle
getLifecycleState
public final LifecycleState getLifecycleState()
- Specified by:
getLifecycleState
in interface ILifecycle
- Since:
- 3.0
isActive
public final boolean isActive()
- Specified by:
isActive
in interface ILifecycle
toString
public String toString()
- Overrides:
toString
in class Object
dump
protected final void dump()
checkActive
protected final void checkActive()
checkInactive
protected final void checkInactive()
checkNull
protected final void checkNull(Object handle,
String msg)
throws NullPointerException
- Throws:
NullPointerException
checkArg
protected final void checkArg(boolean expr,
String msg)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
checkArg
protected final void checkArg(Object handle,
String handleName)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
checkState
protected final void checkState(boolean expr,
String msg)
throws IllegalStateException
- Throws:
IllegalStateException
checkState
protected final void checkState(Object handle,
String handleName)
throws IllegalStateException
- Throws:
IllegalStateException
deferredActivate
protected final void deferredActivate(boolean successful)
- Since:
- 2.0
isDeferredActivation
public boolean isDeferredActivation()
- Specified by:
isDeferredActivation
in interface ILifecycle.DeferrableActivation
- Since:
- 3.2
doBeforeActivate
protected void doBeforeActivate()
throws Exception
- Throws:
Exception
doActivate
protected void doActivate()
throws Exception
- Throws:
Exception
doAfterActivate
protected void doAfterActivate()
throws Exception
- Throws:
Exception
- Since:
- 3.0
doBeforeDeactivate
protected void doBeforeDeactivate()
throws Exception
- Throws:
Exception
doDeactivate
protected void doDeactivate()
throws Exception
- Throws:
Exception
Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.