|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.qi4j.spi.service.importer.InstanceImporter<T>
public final class InstanceImporter<T>
Return a predefined service instance that was provided as meta-info. Search for meta-info in the following order: the service itself, the module of the service, the layer of the service, the whole application.
Constructor Summary | |
---|---|
InstanceImporter()
|
Method Summary | |
---|---|
T |
importService(ImportedServiceDescriptor serviceDescriptor)
Imports an instance of the service type described in the service descriptor. |
boolean |
isActive(T instance)
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 InstanceImporter()
Method Detail |
---|
public T importService(ImportedServiceDescriptor serviceDescriptor) throws ServiceImporterException
ServiceImporter
importService
in interface ServiceImporter<T>
serviceDescriptor
- The service descriptor.
ServiceImporterException
- if import failed.public boolean isActive(T instance)
ServiceImporter
isActive
in interface ServiceImporter<T>
instance
- 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 |