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 TypeMethodDescriptionbooleanAnswertrueif this object is startedvoidstart()Start the component lifecycle.voidstop()Stop the component lifecycle.booleanstopRequested(Set visited) Ask the component if it agrees to end its lifecycle at the very moment.
-
Method Details
-
isStarted
boolean isStarted()Answertrueif this object is started- Returns:
- Answer
trueif 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.
-