org.qi4j.bootstrap
Interface ServiceDeclaration
public interface ServiceDeclaration
Fluent API for declaring services hosted in Qi4j. Instances
of this API are acquired by calling ModuleAssembly.services(Class[])
.
setMetaInfo
ServiceDeclaration setMetaInfo(java.lang.Object serviceAttribute)
visibleIn
ServiceDeclaration visibleIn(Visibility visibility)
withConcerns
ServiceDeclaration withConcerns(java.lang.Class<?>... concerns)
withSideEffects
ServiceDeclaration withSideEffects(java.lang.Class<?>... sideEffects)
withMixins
ServiceDeclaration withMixins(java.lang.Class<?>... mixins)
withTypes
ServiceDeclaration withTypes(java.lang.Class<?>... types)
identifiedBy
ServiceDeclaration identifiedBy(java.lang.String identity)
taggedWith
ServiceDeclaration taggedWith(java.lang.String... tags)
instantiateOnStartup
ServiceDeclaration instantiateOnStartup()
withActivators
ServiceDeclaration withActivators(java.lang.Class<? extends Activator<?>>... activators)
- Set the service activators. Activators are executed in order around the
ServiceReference activation and passivation.
- Parameters:
activators
- the service activators
- Returns:
- the assembly