Examples of application()


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

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

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

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

        // Passivate
View Full Code Here

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

                        instantiateOnStartup();
            }

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

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

        // Passivate
View Full Code Here

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

            }

        };

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

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

        // Passivate
View Full Code Here

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

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

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

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

        service.get().doStuff();

        assertTrue( isActive );

        assembly.application().passivate();

        assertFalse( isActive );
    }

    @Mixins( { MyServiceMixin.class } )
View Full Code Here

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

                module.services( ProjectedDividendsService.class ).instantiateOnStartup();
                module.values( DivStream.class, DivPoint.class );
                new CxfAssembler().assemble( module );
            }
        };
        final Application application = assembler.application();
        Runtime.getRuntime().addShutdownHook( new Thread()
        {
            @Override
            public void run()
            {
View Full Code Here

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

        service.get();

        assertTrue( isActive );

        assembly.application().passivate();

        assertFalse( isActive );
    }

    public static interface ActivatableComposite
View Full Code Here

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

        {
            assertTrue( "Service should not be Active before accessed", !service.isActive() );
            assertTrue( service.get().data().activated );
            assertTrue( "Service should be Active after access.", service.isActive() );
        }
        assembly.application().passivate();
    }

    @Test
    public void givenMixedSuccessFailurePassivationWhenPassivatingExpectAllPassivateMethodsToBeCalled()
        throws Exception
View Full Code Here

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

            assertTrue( "Data should indicate that the service is activated", data.activated );
            assertTrue( "Service should be Active after access.", service.isActive() );
        }
        try
        {
            assembly.application().passivate();
            fail( "PassivationException should have been thrown." );
        }
        catch( PassivationException e )
        {
            // Expected
View Full Code Here

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

        {
            assertTrue( "Service should not be Active before accessed", !service.isActive() );
            assertTrue( service.get().data().activated );
            assertTrue( "Service should be Active after access.", service.isActive() );
        }
        assembly.application().passivate();
    }

    @Mixins(DataAccessMixin.class)
    public interface DataAccessService
        extends DataAccess, ServiceComposite
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.