Package com._1c.g5.v8.dt.lifecycle
Class LifecycleRegistration
- java.lang.Object
-
- com._1c.g5.v8.dt.lifecycle.LifecycleRegistration
-
@Deprecated public final class LifecycleRegistration extends Object
Deprecated.the lifecycle services would be marked withLifecycleServiceannotation.Provides a fluent API for lifecycle service registration.- Since:
- 3.0.0
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaccept()Deprecated.Accepts the configured service to the lifecycle registry.static LifecycleRegistrationregister(ILifecyclePhaseAwareService service)Deprecated.Registers the specified service.LifecycleRegistrationwithDependencies(IServiceDependencyProvider dependencyProvider)Deprecated.Adds dependency provider for services with dynamic dependencies.LifecycleRegistrationwithDependencies(LifecyclePhase phase, String... services)Deprecated.Adds service dependencies in the given context.LifecycleRegistrationwithName(String serviceName)Deprecated.Sets the name for service registration.
-
-
-
Method Detail
-
register
public static LifecycleRegistration register(ILifecyclePhaseAwareService service)
Deprecated.Registers the specified service.- Parameters:
service- the service to register, cannot benull.- Returns:
- a lifecycle registration instance, never
null.
-
withName
public LifecycleRegistration withName(String serviceName)
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
public LifecycleRegistration withDependencies(LifecyclePhase phase, String... services)
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
public LifecycleRegistration withDependencies(IServiceDependencyProvider dependencyProvider)
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.
-
-