public interface ActivationResult
Represents the result of a service activation or deactivation.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic ActivationResultcreateSuccess(ServiceProvider<?> serviceProvider) Creates a successful result.error()Any throwable/exceptions that were observed during activation.default booleanfailure()Returns true if this result was unsuccessful.default booleanfinished()Returns true if this result is finished.Optionally, given by the implementation provider to indicate the future completion when the provider'sActivationStatusisActivationStatus.WARNING_SUCCESS_BUT_NOT_READY.The activation phase we finished successfully on, or are otherwise currently in if not yet finished.How did the activation finish.Map<String,? extends InjectionPlan> The injection plan that was found or determined, key'ed by each element'sServiceProvider.id().The dependencies that were resolved or loaded, key'ed by each element'sServiceProvider.id().The service provider undergoing activation or deactivation.The activation phase that was found at onset of the phase transition.default booleansuccess()Returns true if this result was successful.The activation phase that was requested at the onset of the phase transition.booleanSet to true if the injection plan inresolvedDependencies()has been resolved and can be "trusted" as being complete and accurate.
-
Method Details
-
serviceProvider
ServiceProvider<?> serviceProvider()The service provider undergoing activation or deactivation.- Returns:
- the service provider generating the result
-
finishedActivationResult
Optional<Future<ActivationResult>> finishedActivationResult()Optionally, given by the implementation provider to indicate the future completion when the provider'sActivationStatusisActivationStatus.WARNING_SUCCESS_BUT_NOT_READY.- Returns:
- the future result, assuming how activation can be async in nature
-
startingActivationPhase
Phase startingActivationPhase()The activation phase that was found at onset of the phase transition.- Returns:
- the starting phase
-
targetActivationPhase
Phase targetActivationPhase()The activation phase that was requested at the onset of the phase transition.- Returns:
- the target, desired, ultimate phase requested
-
finishingActivationPhase
Phase finishingActivationPhase()The activation phase we finished successfully on, or are otherwise currently in if not yet finished.- Returns:
- the finishing phase
-
finishingStatus
Optional<ActivationStatus> finishingStatus()How did the activation finish. Will only be populated if the lifecycle event has completed - seefinishedActivationResult().- Returns:
- the finishing status
-
injectionPlans
Map<String,? extends InjectionPlan> injectionPlans()The injection plan that was found or determined, key'ed by each element'sServiceProvider.id().- Returns:
- the resolved injection plan map
-
resolvedDependencies
The dependencies that were resolved or loaded, key'ed by each element'sServiceProvider.id().- Returns:
- the resolved dependency map
-
wasResolved
boolean wasResolved()Set to true if the injection plan inresolvedDependencies()has been resolved and can be "trusted" as being complete and accurate.- Returns:
- true if was resolved
-
error
Any throwable/exceptions that were observed during activation.- Returns:
- any captured error
-
finished
default boolean finished()Returns true if this result is finished.- Returns:
- true if finished
-
success
default boolean success()Returns true if this result was successful.- Returns:
- true if successful
-
failure
default boolean failure()Returns true if this result was unsuccessful.- Returns:
- true if unsuccessful
-
createSuccess
Creates a successful result.- Parameters:
serviceProvider- the service provider- Returns:
- the result
-