Package org.qi4j.bootstrap

Examples of org.qi4j.bootstrap.SingletonAssembler.application()


            {
                application.registerActivationEventListener( new EventsRecorder( events ) );
            }

        };
        Application application = assembler.application();
        application.passivate();

        Iterator<ActivationEvent> it = events.iterator();

        // Activation
View Full Code Here


                throws AssemblyException
            {
                module.values( Does.class ).withConcerns( DoesConcern.class );
            }
        };
        Module module = singletonAssembler.application().findModule( "Layer 1", "Module 1" );
        Does does = module.newValue( Does.class );
        does.doSomething();
    }

    @Test
View Full Code Here

                throws AssemblyException
            {
                module.values( Does.class ).withSideEffects( DoesSideEffect.class );
            }
        };
        Module module = singletonAssembler.application().findModule( "Layer 1", "Module 1" );
        Does does = module.newValue( Does.class );
        does.doSomething();
    }

    public static class DoesConcern extends ConcernOf<Does>
View Full Code Here

                module.withActivators( TestedActivator.class );
            }

        };
        // Activate
        Application application = assembly.application();

        // Assert activated
        Assert.assertEquals( "Activation Level", 2, activationLevel );

        // Passivate
View Full Code Here

                        importOnStartup();
                module.objects( TestedServiceInstance.class );
            }

        };
        Application application = assembler.application();
        assertEquals( "Activation Level", 2, activationLevel );
        application.passivate();
        assertEquals( "Passivation Level", 2, passivationLevel );
    }
View Full Code Here

                        importOnStartup();
                module.services( TestedServiceImporterService.class ).identifiedBy( "testimporter" );
            }

        };
        Application application = assembler.application();
        assertEquals( "Activation Level", 2, activationLevel );
        application.passivate();
        assertEquals( "Passivation Level", 2, passivationLevel );
    }
View Full Code Here

                module.layer().withActivators( TestedActivator.class );
            }

        };
        // Activate
        Application application = assembly.application();

        // Assert activated
        Assert.assertEquals( "Activation Level", 2, activationLevel );

        // Passivate
View Full Code Here

                        instantiateOnStartup();
            }

        };
        // Activate
        Application application = assembly.application();

        // Assert activated
        Assert.assertEquals( "Activation Level", 4, activationLevel );

        // Passivate
View Full Code Here

            }

        };

        // Activate
        Application application = assembly.application();

        // Assert activated
        Assert.assertEquals( "Activation Level", 2, activationLevel );

        // Passivate
View Full Code Here

                        setMetaInfo( new TestedServiceInstance() ).
                        importOnStartup();
            }

        };
        Application application = assembler.application();
        assertEquals( "Activation Level", 2, activationLevel );
        application.passivate();
        assertEquals( "Passivation Level", 2, passivationLevel );
    }
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.