Examples of Energy4Java


Examples of org.qi4j.bootstrap.Energy4Java

    private void startQi4j()
    {
        try
        {
            logger.info( "Starting Qi4j application" );
            Energy4Java qi4j = new Energy4Java();
            qi4jApp = qi4j.newApplication( getAssembler() );
            qi4jApp.activate();
            qi4jModule = qi4jApp.findModule( defaultLayerName(), defaultModuleName() );

            // Qi4j injects @Structure and @Service elements into this application instance
            //qi4jModule.newObject( WicketQi4jApplication.class );
View Full Code Here

Examples of org.qi4j.bootstrap.Energy4Java

            super.cleanUp();
        }
        finally
        {

            Energy4Java qi4j = new Energy4Java();
            Assembler[][][] assemblers = new Assembler[][][]
            {
                {
                    {
                        createAssembler()
                    }
                }
            };
            Application application = qi4j.newApplication( new ApplicationAssemblerAdapter( assemblers )
            {
            } );
            application.activate();

            Module moduleInstance = application.findModule( "Layer 1", "config" );
View Full Code Here

Examples of org.qi4j.bootstrap.Energy4Java

    @BeforeClass
    public static void setup() throws Exception
    {
        System.out.println( "\n@@@@@@@@@@@@@@@  TEST  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" );
        app = new Energy4Java().newApplication( new TestAssembler() );
        app.activate();

        // Separate test suites in console output
        System.out.println();
    }
View Full Code Here

Examples of org.qi4j.bootstrap.Energy4Java

public class VisualizeApplicationStructure
{
    public static void main( String[] args )
        throws Exception
    {
        Energy4Java qi4j = new Energy4Java();
        Assembler assembler = new Assembler();
        ApplicationDescriptor applicationModel = qi4j.newApplicationModel( assembler );
        applicationModel.newInstance( qi4j.spi() );

        /*
       * The Envisage Swing app visualizes the application assemblage structure.
       *
       * Tree view:
View Full Code Here

Examples of org.qi4j.bootstrap.Energy4Java

    private void startQi4j()
    {
        try
        {
            logger.info( "Starting Qi4j application" );
            Energy4Java qi4j = new Energy4Java();
            qi4jApp = qi4j.newApplication( getAssembler() );
            qi4jApp.activate();
            qi4jModule = qi4jApp.findModule( defaultLayerName(), defaultModuleName() );

            // Qi4j injects @Structure and @Service elements into this application instance
            qi4jModule.injectTo( this );
View Full Code Here

Examples of org.qi4j.bootstrap.Energy4Java

    @BeforeClass
    public static void setUp()
        throws Exception
    {
        qi4j = new Energy4Java();
        applicationModel = newApplication();
        if( applicationModel == null )
        {
            // An AssemblyException has occurred that the Test wants to check for.
            return;
View Full Code Here

Examples of org.qi4j.bootstrap.Energy4Java

    @Before
    public void setUp()
        throws Exception
    {
        qi4j = new Energy4Java();
        applicationModel = newApplication();
        if( applicationModel == null )
        {
            // An AssemblyException has occurred that the Test wants to check for.
            return;
View Full Code Here

Examples of org.qi4j.bootstrap.Energy4Java

            Schema schema = schemaFactory.newSchema( schemaSources );
            documentFactory.setSchema( schema );

            ApplicationAssembler assembler = createApplicationAssembler( config );

            Energy4Java qi4j = new Energy4Java();
            application = qi4j.newApplication( assembler );
            application.activate();
            Module module = application.findModule( "WebLayer", "PagesModule" );
            finder = module;

            if( application.mode() == Application.Mode.development )
View Full Code Here

Examples of org.qi4j.bootstrap.Energy4Java

{

    public static void main( String[] args )
            throws Exception
    {
        final Application application = new Energy4Java().newApplication( new AppAssembler() );
        application.activate();
        Runtime.getRuntime().addShutdownHook( new Thread( new Runnable()
        {
            @Override
            @SuppressWarnings( "CallToThreadDumpStack" )
View Full Code Here

Examples of org.qi4j.bootstrap.Energy4Java

{
    @Test( expected = NoSuchTransientException.class )
    public void testPrivateCompositeVisibility()
        throws Exception
    {
        Energy4Java boot = new Energy4Java();
        Assembler[][][] assemblers = new Assembler[][][]
            {
                { // Layer
                  {
                      new AssemblerA()
                  },
                  {
                      new AssemblerB()
                  }
                }
            };
        Application app = boot.newApplication( new ApplicationAssemblerAdapter( assemblers )
        {
        } );
        app.activate();
        ObjectA object = app.findModule( "Layer 1", "Module A" ).newObject( ObjectA.class );
        object.test();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.