Search in sources :

Example 1 with BackendService

use of org.ovirt.engine.core.common.BackendService in project ovirt-engine by oVirt.

the class ServiceLoader method load.

/**
 * Load CDI beans of type {@code BackendService} by simply getting their reference from
 * the bean manager. If the instance doesn't exist (which is the assumption) it will be created
 * and post-constructed (using {@code @PostConstruct} annotated method).
 *
 * After creation the {@link BackendService#onServiceLoad()} hook will be invoked where
 * the service can perform initialization that is dependant on the presence of fully constructed
 * service bean in the CDI context. Useful for breaking dependency-cycles where parent service
 * manually constructs CDI-managed children that depend on the parent via CDI.
 *
 * @param service a provider of {@code BackendService} instances. see {@linkplain Instance}
 */
public void load(Class<? extends BackendService> service) {
    BackendService backendService = services.select(service).get();
    log.info("Start {} ", backendService);
}
Also used : BackendService(org.ovirt.engine.core.common.BackendService)

Aggregations

BackendService (org.ovirt.engine.core.common.BackendService)1