org.qi4j.bootstrap
Interface ImportedServiceDeclaration


public interface ImportedServiceDeclaration

Fluent API for declaring imported services. Instances of this API are acquired by calling ModuleAssembly.importedServices(Class[]).


Field Summary
static java.lang.Class<? extends ServiceImporter> INSTANCE
           
static java.lang.Class<? extends ServiceImporter> NEW_OBJECT
           
static java.lang.Class<? extends ServiceImporter> SERVICE_IMPORTER
           
static java.lang.Class<? extends ServiceImporter> SERVICE_SELECTOR
           
 
Method Summary
 ImportedServiceDeclaration identifiedBy(java.lang.String identity)
           
 ImportedServiceDeclaration importedBy(java.lang.Class<? extends ServiceImporter> serviceImporterClass)
           
 ImportedServiceDeclaration importOnStartup()
           
 ImportedServiceDeclaration setMetaInfo(java.lang.Object serviceAttribute)
           
 ImportedServiceDeclaration taggedWith(java.lang.String... tags)
           
 ImportedServiceDeclaration visibleIn(Visibility visibility)
           
 ImportedServiceDeclaration withActivators(java.lang.Class<? extends Activator<?>>... activators)
          Set the imported service activators.
 

Field Detail

INSTANCE

static final java.lang.Class<? extends ServiceImporter> INSTANCE

NEW_OBJECT

static final java.lang.Class<? extends ServiceImporter> NEW_OBJECT

SERVICE_SELECTOR

static final java.lang.Class<? extends ServiceImporter> SERVICE_SELECTOR

SERVICE_IMPORTER

static final java.lang.Class<? extends ServiceImporter> SERVICE_IMPORTER
Method Detail

visibleIn

ImportedServiceDeclaration visibleIn(Visibility visibility)

importedBy

ImportedServiceDeclaration importedBy(java.lang.Class<? extends ServiceImporter> serviceImporterClass)

identifiedBy

ImportedServiceDeclaration identifiedBy(java.lang.String identity)

taggedWith

ImportedServiceDeclaration taggedWith(java.lang.String... tags)

setMetaInfo

ImportedServiceDeclaration setMetaInfo(java.lang.Object serviceAttribute)

importOnStartup

ImportedServiceDeclaration importOnStartup()

withActivators

ImportedServiceDeclaration withActivators(java.lang.Class<? extends Activator<?>>... activators)
Set the imported service activators. Activators are executed in order around the ServiceReference activation and passivation.

Parameters:
activators - the imported service activators
Returns:
the assembly