Package de.intarsys.tools.component
Interface IStartStop
- All Superinterfaces:
IInstantiable
- All Known Implementing Classes:
CommonStartStop
,LifecycleWatchdog
This describes the components ability to explicitly start or stop its
lifecycle. This is an alternative and more detailed description than
supported by IStartable and should be preferred.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Answertrue
if this object is startedvoid
start()
Start the component lifecycle.void
stop()
Stop the component lifecycle.boolean
stopRequested
(Set visited) Ask the component if it agrees to end its lifecycle at the very moment.
-
Method Details
-
isStarted
boolean isStarted()Answertrue
if this object is started- Returns:
- Answer
true
if this object is started.
-
start
void start()Start the component lifecycle. A RuntimeException is expected when starting the component fails. -
stop
void stop()Stop the component lifecycle. All resources should be freed. A RuntimeException is expected when stopping the component fails. -
stopRequested
Ask the component if it agrees to end its lifecycle at the very moment. The component may deny this request, but it must be prepared anyway to be stopped.- Parameters:
visited
- The optional set of already visited objects in the stop request cycle.
-