Package org.qi4j.bootstrap

Examples of org.qi4j.bootstrap.ServiceDeclaration


    @Override
    public void assemble( ModuleAssembly module )
        throws AssemblyException
    {
        module.services( UuidIdentityGeneratorService.class ).visibleIn( visibility() );
        ServiceDeclaration service = module.services( VoldemortEntityStoreService.class ).
            visibleIn( visibility() ).
            instantiateOnStartup();
        if( hasIdentity() )
        {
            service.identifiedBy( identity() );
        }
        if( hasConfig() )
        {
            configModule().entities( VoldemortConfiguration.class ).visibleIn( configVisibility() );
        }
View Full Code Here


    public void assemble( ModuleAssembly module )
        throws AssemblyException
    {
        module.services( UuidIdentityGeneratorService.class ).
            visibleIn( visibility() );
        ServiceDeclaration service = module.services( RiakMapEntityStoreService.class ).
            withMixins( RiakProtobufMapEntityStoreMixin.class ).
            visibleIn( visibility() );
        if( hasIdentity() )
        {
            service.identifiedBy( identity() );
        }
        if( hasConfig() )
        {
            configModule().entities( RiakProtobufEntityStoreConfiguration.class ).
                visibleIn( configVisibility() );
View Full Code Here

    public void assemble( ModuleAssembly module )
        throws AssemblyException
    {
        module.services( UuidIdentityGeneratorService.class ).
            visibleIn( visibility() );
        ServiceDeclaration service = module.services( RiakMapEntityStoreService.class ).
            withMixins( RiakHttpMapEntityStoreMixin.class ).
            visibleIn( visibility() );
        if( hasIdentity() )
        {
            service.identifiedBy( identity() );
        }
        if( hasConfig() )
        {
            configModule().entities( RiakHttpEntityStoreConfiguration.class ).
                visibleIn( configVisibility() );
View Full Code Here

{
    @Override
    public void assemble( ModuleAssembly module )
        throws AssemblyException
    {
        ServiceDeclaration service = module.services( MemcachePoolService.class ).visibleIn( visibility() );
        if( hasIdentity() )
        {
            service.identifiedBy( identity() );
        }
        if( hasConfig() )
        {
            configModule().entities( MemcacheConfiguration.class ).visibleIn( configVisibility() );
        }
View Full Code Here

{
    @Override
    public void assemble( ModuleAssembly module )
        throws AssemblyException
    {
        ServiceDeclaration service = module.services( EhCachePoolService.class ).visibleIn( visibility() );
        if( hasIdentity() )
        {
            service.identifiedBy( identity() );
        }
        if( hasConfig() )
        {
            configModule().entities( EhCacheConfiguration.class ).visibleIn( configVisibility() );
        }
View Full Code Here

    @Override
    public void assemble( ModuleAssembly module )
        throws AssemblyException
    {
        module.services( UuidIdentityGeneratorService.class ).visibleIn( visibility() );
        ServiceDeclaration service = module.services( HazelcastEntityStoreService.class ).
            visibleIn( visibility() ).
            instantiateOnStartup();
        if( hasIdentity() )
        {
            service.identifiedBy( identity() );
        }
        if( hasConfig() )
        {
            configModule().entities( HazelcastConfiguration.class ).visibleIn( configVisibility() );
        }
View Full Code Here

    @Override
    public void assemble( ModuleAssembly module )
        throws AssemblyException
    {
        module.services( JdbmEntityStoreService.class ).visibleIn( visibility() );
        ServiceDeclaration service = module.services( UuidIdentityGeneratorService.class ).visibleIn( visibility() );
        if( hasIdentity() )
        {
            service.identifiedBy( identity() );
        }
        if( hasConfig() )
        {
            configModule().entities( JdbmConfiguration.class ).visibleIn( configVisibility() );
        }
View Full Code Here

    @Override
    public final void assemble( ModuleAssembly module )
        throws AssemblyException
    {
        ServiceDeclaration service = module.services( httpService() ).
            visibleIn( visibility() ).
            instantiateOnStartup();
        if( hasIdentity() )
        {
            service.identifiedBy( identity() );
        }
        if( hasConfig() )
        {
            configModule().entities( configurationEntity() ).visibleIn( configVisibility() );
        }
View Full Code Here

    // START SNIPPET: instantiateOnStartup
    @Override
    public void assemble( ModuleAssembly module )
        throws AssemblyException
    {
        ServiceDeclaration service = module.addServices( MyDemoService.class );
        // END SNIPPET: tag
        service.instantiateOnStartup();
        // END SNIPPET: instantiateOnStartup
        // START SNIPPET: tag
        service.taggedWith( "Important", "Drain" );
        // END SNIPPET: tag
    }
View Full Code Here

                    .setMetaInfo( new ServiceName( "Foo" ) );
                module.services( StringService.class, LongService.class );
                module.objects( ServiceUser.class );

                ModuleAssembly module2 = module.layer().module( "Other module" );
                ServiceDeclaration service2Decl = module2.services( MyServiceComposite.class );
                service2Decl.identifiedBy( "Bar" ).setMetaInfo( new ServiceName( "Bar" ) ).visibleIn( layer );

                ServiceDeclaration service3Decl = module2.services( MyServiceComposite2.class );
                service3Decl.identifiedBy( "Boo" ).setMetaInfo( new ServiceName( "Boo" ) );
            }
        };

        testInjection( assembly );
    }
View Full Code Here

TOP

Related Classes of org.qi4j.bootstrap.ServiceDeclaration

Copyright © 2018 www.massapicom. 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.