Java 类com.google.inject.servlet.SessionScoped 实例源码

项目:eureka    文件:AppModule.java   
@Override
protected void configure() {
    bind(new TypeLiteral<UserDao<? extends UserEntity<? extends RoleEntity>>>() {}).to(JpaUserDao.class);
    bind(edu.emory.cci.aiw.cvrg.eureka.services.dao.UserDao.class).to(JpaUserDao.class);
    bind(RoleDao.class).to(JpaRoleDao.class);
    bind(PhenotypeEntityDao.class).to(JpaPhenotypeEntityDao.class);
    bind(TimeUnitDao.class).to(JpaTimeUnitDao.class);
    bind(RelationOperatorDao.class).to(JpaRelationOperatorDao.class);
    bind(ValueComparatorDao.class).to(JpaValueComparatorDao.class);
    bind(ThresholdsOperatorDao.class).to(JpaThresholdsOperatorDao.class);
    bind(FrequencyTypeDao.class).to(JpaFrequencyTypeDao.class);
    bind(ThresholdsOperatorDao.class).to
            (JpaThresholdsOperatorDao.class);
    bind(new TypeLiteral<PropositionFinder<
            String>>(){}).to(SystemPropositionFinder.class);

    bind(Context.class).to(InitialContext.class);
    bind(Session.class).toProvider(
            JndiIntegration.fromJndi(Session.class,
                    "java:comp/env/mail/Session"));

    bind(EtlClient.class).toProvider(this.etlClientProvider).in(SessionScoped.class);
}
项目:eureka    文件:AppModule.java   
@Override
protected void configure() {
    bind(RouterTable.class).to(WebappRouterTable.class).in(SessionScoped.class);
    bind(WebappProperties.class).toInstance(this.webappProperties);
    bind(CasEurekaClinicalProperties.class).toInstance(this.webappProperties);
    bind(ServicesClient.class).toProvider(this.servicesClientProvider).in(SessionScoped.class);
    bind(EtlClient.class).toProvider(this.etlClientProvider).in(SessionScoped.class);
    bind(EurekaClinicalUserClient.class).toProvider(this.userClientProvider).in(SessionScoped.class);
    bind(EurekaClinicalRegistryClient.class).toProvider(this.registryClientProvider).in(SessionScoped.class);
}
项目:st-toolset    文件:AbstractApplicationModule.java   
protected void configureUserSession() {
    bind(UserSession.class).to(getUserSessionClass()).in(SessionScoped.class);
}