use of org.apache.sling.distribution.monitor.impl.UserCredentialsDistributionTransportSecretMBean in project sling by apache.
the class UserCredentialsDistributionTransportSecretProvider method activate.
@Activate
protected void activate(BundleContext context, Map<String, Object> config) {
username = PropertiesUtil.toString(config.get(USERNAME), "").trim();
password = PropertiesUtil.toString(config.get(PASSWORD), "").trim();
String id = String.valueOf(username.hashCode());
Dictionary<String, String> mbeanProps = new Hashtable<String, String>();
mbeanProps.put("jmx.objectname", "org.apache.sling.distribution:type=transport,id=" + ObjectName.quote(id));
UserCredentialsDistributionTransportSecretMBean mbean = new UserCredentialsDistributionTransportSecretMBeanImpl(username);
mbeanServiceRegistration = context.registerService(UserCredentialsDistributionTransportSecretMBean.class.getName(), mbean, mbeanProps);
}
Aggregations