Package com._1c.g5.v8.dt.lifecycle
Class LifecycleRegistration
java.lang.Object
com._1c.g5.v8.dt.lifecycle.LifecycleRegistration
Deprecated.
Provides a fluent API for lifecycle service registration.
- Since:
- 3.0.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidaccept()Deprecated.Accepts the configured service to the lifecycle registry.static LifecycleRegistrationregister(ILifecyclePhaseAwareService service) Deprecated.Registers the specified service.withDependencies(IServiceDependencyProvider dependencyProvider) Deprecated.Adds dependency provider for services with dynamic dependencies.withDependencies(LifecyclePhase phase, String... services) Deprecated.Adds service dependencies in the given context.Deprecated.Sets the name for service registration.
-
Method Details
-
register
Deprecated.Registers the specified service.- Parameters:
service- the service to register, cannot benull.- Returns:
- a lifecycle registration instance, never
null.
-
withName
Deprecated.Sets the name for service registration.- Parameters:
serviceName- the service name to use while registration in the registry, cannot benull.- Returns:
- a reference to this object, never
null.
-
withDependencies
Deprecated.Adds service dependencies in the given context.
This method can be executed several times. Dependencies are accumulated.ServiceRegistration sr = ...; sr.withDependencies(LifecyclePhase.CHECKING, "S1", "S4"); sr.withDependencies(LifecyclePhase.CHECKING, "S2"); sr.withDependencies(LifecyclePhase.RESOURCE_LOADING, "S2", "S3");
In result for 'CHECKING' phase we will have {"S1", "S2", "S4"} and for 'RESOURCE_LOADING' - {"S2", "S3"}- Parameters:
phase- the phase to participate, cannot benull.services- the service names on which service is dependent, cannot benull.- Returns:
- a reference to this object, never
null. - Throws:
IllegalStateException- if dependency provider is already registered.
-
withDependencies
Deprecated.Adds dependency provider for services with dynamic dependencies.- Parameters:
dependencyProvider- the service dependencies provider, cannot benull.- Returns:
- a reference to this object.
- Throws:
IllegalStateException- if static dependencies is already registered.
-
accept
public void accept()Deprecated.Accepts the configured service to the lifecycle registry.
-
LifecycleServiceannotation.