Package org.orgama.server.scope

Examples of org.orgama.server.scope.TrueSingletonScope


  private static class ModuleWithTrueSingleton extends AbstractModule {

    @Override
    protected void configure() {
      //bind the true singleton scope to an instance created right here
      TrueSingletonScope trueSingletonScope = new TrueSingletonScope();
      bindScope(TrueSingleton.class, trueSingletonScope);
      bind(TrueSingletonScope.class)
          .annotatedWith(Names.named("trueSingletonScope"))
          .toInstance(trueSingletonScope);
View Full Code Here


  protected void bindCommonComponents() {
   
    bind(Orgama.class).in(TestEagerSingleton.class);
   
    //bind the true singleton scope to an instance created right here
    TrueSingletonScope trueSingletonScope = new TrueSingletonScope();
    bindScope(TrueSingleton.class, trueSingletonScope);
    bind(TrueSingletonScope.class).toInstance(trueSingletonScope);
   
    //bind a token formatter
        bind(TokenFormatter.class).to(BetterTokenFormatter.class)
View Full Code Here

    bind(ServerSideConstants.class).in(TrueSingleton.class);
  }
 
  protected void bindScopes() {
    //bind the true singleton scope to an instance created right here
    TrueSingletonScope trueSingletonScope = new TrueSingletonScope();
    bindScope(TrueSingleton.class, trueSingletonScope);
    bind(TrueSingletonScope.class).toInstance(trueSingletonScope);
  }
View Full Code Here

TOP

Related Classes of org.orgama.server.scope.TrueSingletonScope

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.