public class ServiceInstanceImporter<T> extends Object implements ServiceImporter<T>
module.services(MyServiceImporterService.class).identifiedBy("someid");
module.importedServices(OtherService.class).importedBy(ServiceInstanceImporter.class).setMetaInfo("someid");
| Constructor and Description |
|---|
ServiceInstanceImporter() |
| Modifier and Type | Method and Description |
|---|---|
T |
importService(ImportedServiceDescriptor importedServiceDescriptor)
Imports an instance of the service type described in the service descriptor.
|
boolean |
isAvailable(T instance)
Ask if the service is available or not.
|
public T importService(ImportedServiceDescriptor importedServiceDescriptor) throws ServiceImporterException
ServiceImporterimportService in interface ServiceImporter<T>importedServiceDescriptor - The service descriptor.ServiceImporterException - if import failed.public boolean isAvailable(T instance)
ServiceImporterisAvailable in interface ServiceImporter<T>instance - the instance to be checked