|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.qi4j.spi.service.importer.ServiceInstanceImporter<T>
public class ServiceInstanceImporter<T>
Use a registered service that implements ServiceImporter to do the actual import. The service id of the service that this importer should delegate to must be set as meta-info on this service. Example: module.services(MyServiceImporterService.class).identifiedBy("someid"); module.importedServices(OtherService.class).importedBy(ServiceInstanceImporter.class).setMetaInfo("someid");
Constructor Summary | |
---|---|
ServiceInstanceImporter()
|
Method Summary | |
---|---|
T |
importService(ImportedServiceDescriptor importedServiceDescriptor)
Imports an instance of the service type described in the service descriptor. |
boolean |
isActive(T o)
Ask if the underlying service is currently active or not. |
boolean |
isAvailable(T instance)
Ask if the service is available or not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServiceInstanceImporter()
Method Detail |
---|
public T importService(ImportedServiceDescriptor importedServiceDescriptor) throws ServiceImporterException
ServiceImporter
importService
in interface ServiceImporter<T>
importedServiceDescriptor
- The service descriptor.
ServiceImporterException
- if import failed.public boolean isActive(T o)
ServiceImporter
isActive
in interface ServiceImporter<T>
o
- the instance to be checked
public boolean isAvailable(T instance)
ServiceImporter
isAvailable
in interface ServiceImporter<T>
instance
- the instance to be checked
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |