Package org.jboss.msc.service
Interface StartContext
- 
- All Superinterfaces:
- Executor,- LifecycleContext
 
 public interface StartContext extends LifecycleContext The start lifecycle context.- Author:
- David M. Lloyd, Richard Opalka
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidasynchronous()Call within the service lifecycle method to trigger an asynchronous lifecycle action.voidcomplete()Call when either synchronous or asynchronous lifecycle action is complete.voidfailed(StartException reason)Call when start lifecycle action has failed for some reason.ServiceTargetgetChildTarget()Get a service target which may be used to add child services.- 
Methods inherited from interface org.jboss.msc.service.LifecycleContextexecute, getController, getElapsedTime
 
- 
 
- 
- 
- 
Method Detail- 
asynchronousvoid asynchronous() Call within the service lifecycle method to trigger an asynchronous lifecycle action. This action will not be considered complete until indicated so by calling eithercomplete()orfailed(StartException)method on this interface.- Specified by:
- asynchronousin interface- LifecycleContext
 
 - 
failedvoid failed(StartException reason) throws IllegalStateException Call when start lifecycle action has failed for some reason.- Parameters:
- reason- the reason for the failure
- Throws:
- IllegalStateException- if called after- complete()was called
 
 - 
completevoid complete() throws IllegalStateExceptionCall when either synchronous or asynchronous lifecycle action is complete.- Specified by:
- completein interface- LifecycleContext
- Throws:
- IllegalStateException- if called after- failed(StartException)was called or if called twice in a row
 
 - 
getChildTargetServiceTarget getChildTarget() Get a service target which may be used to add child services. Child services have an implicit dependency on their parent, and are automatically removed when the parent service stops (or if the parent service fails during startup).Any listeners added directly to this service target will be added to child services when they are installed. Listeners added directly to this service target will be applied recursively to descendants as well, as long as the listener exists on this service target. To avoid this recursive behavior, apply listeners to any sub-target of this this target (see ServiceTarget.subTarget()for more information about sub-targets).Note that any listeners existing on the starting service are not applied to child services automatically; they must be explicitly added to the child service target. - Returns:
- the child target
 
 
- 
 
-