* @throws ServletException
* @throws KafkaConsumerCacheException
* @throws ConfigDbException
+ * @throws KeyExistsException
*/
@Autowired
public ConfigurationReader(@Qualifier("propertyReader") rrNvReadable settings,
*/
@Qualifier("dMaaPAuthenticatorImpl") DMaaPAuthenticator<NsaSimpleApiKey> fSecurityManager
)
- throws missingReqdSetting, invalidSettingValue, ServletException, KafkaConsumerCacheException, ConfigDbException {
+ throws missingReqdSetting, invalidSettingValue, ServletException, KafkaConsumerCacheException, ConfigDbException, KeyExistsException {
this.fMetrics = fMetrics;
this.zk = zk;
}
protected void servletSetup()
- throws rrNvReadable.missingReqdSetting, rrNvReadable.invalidSettingValue, ServletException, ConfigDbException {
+ throws rrNvReadable.missingReqdSetting, rrNvReadable.invalidSettingValue, ServletException, ConfigDbException, KeyExistsException {
try {
fMetrics.toJson();
if ( adminSecret != null && adminSecret.length () > 0 )
{
- try
- {
final NsaApiDb<NsaSimpleApiKey> adminDb = new BaseNsaApiDbImpl<NsaSimpleApiKey> ( new MemConfigDb(), new NsaSimpleApiKeyFactory() );
adminDb.createApiKey ( "admin", adminSecret );
fSecurityManager.addAuthenticator ( new DMaaPOriginalUebAuthenticator<NsaSimpleApiKey> ( adminDb, 10*60*1000 ) );
- }
- catch ( KeyExistsException e )
- {
- throw new RuntimeException ( "This key can't exist in a fresh in-memory DB!", e );
- }
}
// setup a backend