use of javax.inject.Named in project oxTrust by GluuFederation.
the class AppInitializer method createLdapEntryManager.
@Produces
@ApplicationScoped
@Named(LDAP_ENTRY_MANAGER_NAME)
public LdapEntryManager createLdapEntryManager() {
FileConfiguration ldapConfig = configurationFactory.getLdapConfiguration();
Properties connectionProperties = (Properties) ldapConfig.getProperties();
EncryptionService securityService = encryptionServiceInstance.get();
Properties decryptedConnectionProperties = securityService.decryptProperties(connectionProperties);
LdapEntryManager ldapEntryManager = this.ldapEntryManagerFactory.createEntryManager(decryptedConnectionProperties);
log.info("Created {}: {}", new Object[] { LDAP_ENTRY_MANAGER_NAME, ldapEntryManager.getOperationService() });
return ldapEntryManager;
}
use of javax.inject.Named in project Payara by payara.
the class HK2IntegrationUtilities method getHK2Qualifiers.
private static Set<Annotation> getHK2Qualifiers(InjectionPoint injectionPoint) {
Set<Annotation> setQualifiers = injectionPoint.getQualifiers();
Set<Annotation> retVal = new HashSet<Annotation>();
for (Annotation anno : setQualifiers) {
if (anno.annotationType().equals(Default.class))
continue;
if (anno.annotationType().equals(Named.class)) {
Named named = (Named) anno;
if ("".equals(named.value())) {
Annotated annotated = injectionPoint.getAnnotated();
if (annotated instanceof AnnotatedField) {
AnnotatedField<?> annotatedField = (AnnotatedField<?>) annotated;
Field field = annotatedField.getJavaMember();
anno = new NamedImpl(field.getName());
}
}
}
retVal.add(anno);
}
return retVal;
}
use of javax.inject.Named in project DevRing by LJYcoder.
the class MovieActivityModule method commingMovieFragment.
@ActivityScope
@Provides
@Named("comming")
MovieFragment commingMovieFragment() {
Bundle bundle = new Bundle();
bundle.putInt("type", MovieFragment.TYPE_COMMING);
MovieFragment fragment = new MovieFragment();
fragment.setArguments(bundle);
return fragment;
}
use of javax.inject.Named in project java-tron by tronprotocol.
the class Module method buildTransactionDb.
/**
* build transaction database.
*/
@Provides
@Singleton
@Named("transaction")
public LevelDbDataSourceImpl buildTransactionDb() {
LevelDbDataSourceImpl db = new LevelDbDataSourceImpl(Args.getInstance().getOutputDirectory(), TRANSACTION_DB_NAME);
db.initDB();
return db;
}
use of javax.inject.Named in project java-tron by tronprotocol.
the class Module method buildBlockDb.
/**
* build block database.
*/
@Provides
@Singleton
@Named("block")
public LevelDbDataSourceImpl buildBlockDb() {
LevelDbDataSourceImpl db = new LevelDbDataSourceImpl(Args.getInstance().getOutputDirectory(), BLOCK_DB_NAME);
db.initDB();
return db;
}
Aggregations