public abstract class LifeCycle extends Object implements ManagedObject
| Constructor and Description |
|---|
LifeCycle() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
demoteDependents(LifeCycleStatus to) |
Throwable |
getFailure()
Returns the last known failure when the managed object attempted a transition, otherwise return null.
|
protected abstract ManagedObjectRegistryEventListener |
getListener() |
LifeCycleStatus |
getStatus()
Returns the current managed object status.
|
protected abstract void |
invokeCreate() |
protected abstract void |
invokeDestroy() |
protected abstract void |
invokeStart() |
protected abstract void |
invokeStop() |
void |
managedDestroy()
Destroy the managed object, same as calling
demote(LifeCycleStatus.INITIALIZED). |
void |
managedStart()
Attempt to start the managed object, same as calling
promote(LifeCycleStatus.STARTED). |
protected void |
promoteDependents(LifeCycleStatus to) |
public final LifeCycleStatus getStatus()
ManagedObjectgetStatus in interface ManagedObjectpublic Throwable getFailure()
ManagedObjectgetFailure in interface ManagedObjectpublic final void managedStart()
throws IllegalStateException
ManagedObjectpromote(LifeCycleStatus.STARTED).managedStart in interface ManagedObjectIllegalStateException - when reentrency is detectedpublic final void managedDestroy()
ManagedObjectdemote(LifeCycleStatus.INITIALIZED).managedDestroy in interface ManagedObjectprotected void promoteDependents(LifeCycleStatus to)
protected void demoteDependents(LifeCycleStatus to)
protected abstract void invokeStop()
protected abstract ManagedObjectRegistryEventListener getListener()
Copyright © 2003-2021 GateIn. All Rights Reserved.