org.qi4j.library.osgi
Class OSGiServiceImporter
java.lang.Object
org.qi4j.library.osgi.OSGiServiceImporter
- All Implemented Interfaces:
- ServiceImporter
public class OSGiServiceImporter
- extends Object
- implements ServiceImporter
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OSGiServiceImporter
public OSGiServiceImporter()
importService
public Object importService(ImportedServiceDescriptor serviceDescriptor)
throws ServiceImporterException
- Description copied from interface:
ServiceImporter
- Imports an instance of the service type described in the service descriptor.
- Specified by:
importService
in interface ServiceImporter
- Parameters:
serviceDescriptor
- The service descriptor.
- Returns:
- The imported service instance.
- Throws:
ServiceImporterException
- if import failed.
isActive
public boolean isActive(Object instance)
- Description copied from interface:
ServiceImporter
- Ask if the underlying service is currently active or not.
- Specified by:
isActive
in interface ServiceImporter
- Parameters:
instance
- the instance to be checked
- Returns:
- true if the service is active, false if not
isAvailable
public boolean isAvailable(Object instance)
- Description copied from interface:
ServiceImporter
- Ask if the service is available or not.
- Specified by:
isAvailable
in interface ServiceImporter
- Parameters:
instance
- the instance to be checked
- Returns:
- true if the service is available, false if not