org.qi4j.bootstrap
Class SingletonAssembler

java.lang.Object
  extended by org.qi4j.bootstrap.SingletonAssembler
All Implemented Interfaces:
Assembler

public abstract class SingletonAssembler
extends Object
implements Assembler

Base class for Assembler that creates an Application with one Layer and one Module. Create a subclass of this and implement the Assembler.assemble(ModuleAssembly) method. Once the SingletonAssembler is instantiated it will have created and activated an Application which can be accessed from application(). You can also easily access any resources specific for the single Module, such as the TransientBuilderFactory.


Constructor Summary
SingletonAssembler()
          Creates a Qi4j Runtime instance containing one Layer with one Module.
 
Method Summary
 ApplicationSPI application()
           
 Module module()
           
 ObjectBuilderFactory objectBuilderFactory()
           
 QueryBuilderFactory queryBuilderFactory()
           
 Qi4j runtime()
           
 ServiceFinder serviceFinder()
           
 TransientBuilderFactory transientBuilderFactory()
           
 UnitOfWorkFactory unitOfWorkFactory()
           
 ValueBuilderFactory valueBuilderFactory()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.qi4j.bootstrap.Assembler
assemble
 

Constructor Detail

SingletonAssembler

public SingletonAssembler()
                   throws IllegalStateException
Creates a Qi4j Runtime instance containing one Layer with one Module. The Layer will be named "Layer 1" and the Module will be named "Module 1". It is possible to add additional layers and modules via the Assembler interface that must be implemented in the subclass of this class.

Throws:
IllegalStateException - Either if the model can not be created from the disk, or some inconsistency in the programming model makes it impossible to create it.
Method Detail

runtime

public final Qi4j runtime()

application

public final ApplicationSPI application()

module

public final Module module()

transientBuilderFactory

public final TransientBuilderFactory transientBuilderFactory()

objectBuilderFactory

public final ObjectBuilderFactory objectBuilderFactory()

unitOfWorkFactory

public final UnitOfWorkFactory unitOfWorkFactory()

serviceFinder

public final ServiceFinder serviceFinder()

valueBuilderFactory

public final ValueBuilderFactory valueBuilderFactory()

queryBuilderFactory

public final QueryBuilderFactory queryBuilderFactory()