use of edu.uiuc.ncsa.security.core.IdentifiableProvider in project OA4MP by ncsa.
the class OA2ConfigurationLoader method getTSP.
protected Provider<TransactionStore> getTSP(IdentifiableProvider tp, OA2TConverter<? extends OA2ServiceTransaction> tc) {
if (tsp == null) {
// since this is referenced in an inner class below.
final IdentifiableProvider tp1 = tp;
OA2MultiTypeProvider storeProvider = new OA2MultiTypeProvider(cn, isDefaultStoreDisabled(), loggerProvider.get(), tp);
storeProvider.addListener(createSQLTSP(cn, getMySQLConnectionPoolProvider(), OA4MPConfigTags.MYSQL_STORE, getCSP(), tp, getTokenForgeProvider(), tc));
storeProvider.addListener(createSQLTSP(cn, getMariaDBConnectionPoolProvider(), OA4MPConfigTags.MARIADB_STORE, getCSP(), tp, getTokenForgeProvider(), tc));
storeProvider.addListener(createSQLTSP(cn, getPgConnectionPoolProvider(), OA4MPConfigTags.POSTGRESQL_STORE, getCSP(), tp, getTokenForgeProvider(), tc));
storeProvider.addListener(new OA2FSTStoreProvider(cn, tp, getTokenForgeProvider(), tc));
storeProvider.addListener(new TypedProvider<TransactionStore>(cn, OA4MPConfigTags.MEMORY_STORE, OA4MPConfigTags.TRANSACTIONS_STORE) {
@Override
public Object componentFound(CfgEvent configurationEvent) {
if (checkEvent(configurationEvent)) {
return get();
}
return null;
}
@Override
public TransactionStore get() {
return new OA2MTStore(tp1);
}
});
tsp = storeProvider;
}
return tsp;
}
use of edu.uiuc.ncsa.security.core.IdentifiableProvider in project OA4MP by ncsa.
the class OA2ConfigurationLoader method getTSP.
@Override
protected Provider<TransactionStore> getTSP() {
IdentifiableProvider tp = new ST2Provider(new OA4MPIdentifierProvider(TRANSACTION_ID, false));
OA2TransactionKeys keys = new OA2TransactionKeys();
OA2TConverter<OA2ServiceTransaction> tc = new OA2TConverter<OA2ServiceTransaction>(keys, tp, getTokenForgeProvider().get(), getClientStoreProvider().get());
return getTSP(tp, tc);
}
Aggregations