use of org.eclipse.kura.ssl.SslServiceListener in project kura by eclipse.
the class SslManagerServiceImpl method activate.
// ----------------------------------------------------------------
//
// Activation APIs
//
// ----------------------------------------------------------------
protected void activate(ComponentContext componentContext, Map<String, Object> properties) {
s_logger.info("activate...");
//
// save the bundle context and the properties
this.m_ctx = componentContext;
this.m_properties = properties;
this.m_options = new SslManagerServiceOptions(properties);
this.m_sslSocketFactories = new ConcurrentHashMap<ConnectionSslOptions, SSLSocketFactory>();
ServiceTracker<SslServiceListener, SslServiceListener> listenersTracker = new ServiceTracker<SslServiceListener, SslServiceListener>(componentContext.getBundleContext(), SslServiceListener.class, null);
// Deferred open of tracker to prevent
// java.lang.Exception: Recursive invocation of
// ServiceFactory.getService
// on ProSyst
this.m_sslServiceListeners = new SslServiceListeners(listenersTracker);
// Then self-update our configuration to reflect the password change.
if (!changeDefaultKeystorePassword()) {
// 2. If the password saved in the snapshot and the password hold by
// the CryptoService do not match change the keystore password
// to the password in the snapshot.
changeKeyStorePassword();
}
}
Aggregations