Package 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
,INotifier.INotifier2
,IDeactivateable
,ILifecycle
,ILifecycle.DeferrableActivation
- Direct Known Subclasses:
ExecutorWorkSerializer
,FiniteStateMachine
,LifecycleHook
,ManagedContainer
,Randomizer
,RWLockManager
,RWOLockManager
,SerializingExecutor
,ShareableLifecycle
,UserManager
,UserManagerAuthenticator
,Worker
A default implementation of an entity with a
lifecycle
.- Author:
- Eike Stepper
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle
ILifecycle.DeferrableActivation
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier
INotifier.INotifier2
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
activate()
protected final void
protected final void
protected final void
protected final void
protected final void
protected final void
checkState
(boolean expr, String msg) protected final void
checkState
(Object handle, String handleName) final Exception
protected final void
deferredActivate
(boolean successful) protected void
protected void
protected void
protected void
protected void
protected final void
dump()
final LifecycleState
final boolean
isActive()
boolean
toString()
Methods inherited from class org.eclipse.net4j.util.event.Notifier
addListener, addUniqueListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListener, hasListeners, lastListenerRemoved, listenerAdded, listenerRemoved, removeListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.net4j.util.event.INotifier
addListener, getListeners, hasListeners, removeListener
-
Field Details
-
USE_LABEL
public static boolean USE_LABEL
-
-
Constructor Details
-
Lifecycle
public Lifecycle()- Since:
- 2.0
-
-
Method Details
-
activate
- Specified by:
activate
in interfaceILifecycle
- Throws:
LifecycleException
-
deactivate
- Specified by:
deactivate
in interfaceIDeactivateable
- Specified by:
deactivate
in interfaceILifecycle
-
getLifecycleState
- Specified by:
getLifecycleState
in interfaceILifecycle
- Since:
- 3.0
-
isActive
public final boolean isActive()- Specified by:
isActive
in interfaceILifecycle
-
toString
-
dump
protected final void dump() -
checkActive
protected final void checkActive() -
checkInactive
protected final void checkInactive() -
checkNull
- Throws:
NullPointerException
-
checkArg
- Throws:
IllegalArgumentException
-
checkArg
- Throws:
IllegalArgumentException
-
checkState
- Throws:
IllegalStateException
-
checkState
- Throws:
IllegalStateException
-
deferredActivate
protected final void deferredActivate(boolean successful) - Since:
- 2.0
-
isDeferredActivation
public boolean isDeferredActivation()- Specified by:
isDeferredActivation
in interfaceILifecycle.DeferrableActivation
- Since:
- 3.2
-
doBeforeActivate
- Throws:
Exception
-
doActivate
- Throws:
Exception
-
doAfterActivate
- Throws:
Exception
- Since:
- 3.0
-
doBeforeDeactivate
- Throws:
Exception
-
doDeactivate
- Throws:
Exception
-