summaryrefslogtreecommitdiffstats
path: root/appc-adapters/appc-ansible-adapter
diff options
context:
space:
mode:
Diffstat (limited to 'appc-adapters/appc-ansible-adapter')
-rw-r--r--appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/openecomp/appc/adapter/ansible/AnsibleActivator.java40
1 files changed, 16 insertions, 24 deletions
diff --git a/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/openecomp/appc/adapter/ansible/AnsibleActivator.java b/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/openecomp/appc/adapter/ansible/AnsibleActivator.java
index fa81ef7f9..865841db2 100644
--- a/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/openecomp/appc/adapter/ansible/AnsibleActivator.java
+++ b/appc-adapters/appc-ansible-adapter/appc-ansible-adapter-bundle/src/main/java/org/openecomp/appc/adapter/ansible/AnsibleActivator.java
@@ -38,9 +38,6 @@ import com.att.eelf.configuration.EELFManager;
/**
* This activator is used to initialize and terminate an instance of AnsibleAdapter class
- *
- * Author : Ashwin Sridharan
- * Date : Oct 2016
*/
public class AnsibleActivator implements BundleActivator {
@@ -57,12 +54,12 @@ public class AnsibleActivator implements BundleActivator {
/**
* The logger to be used
*/
- private static final EELFLogger logger = EELFManager.getInstance().getLogger(AnsibleActivator.class);
+ private final EELFLogger logger = EELFManager.getInstance().getLogger(AnsibleActivator.class);
/**
* The configuration object used to configure this bundle
*/
- private Configuration configuration;
+ private final Configuration configuration = ConfigurationFactory.getConfiguration();
/**
* Called when this bundle is started so the Framework can perform the bundle-specific activities necessary to start
@@ -70,26 +67,24 @@ public class AnsibleActivator implements BundleActivator {
* <p>
* This method must complete and return to its caller in a timely manner.
* </p>
- *
- * @param context
- * The execution context of the bundle being started.
- * @throws java.lang.Exception
- * If this method throws an exception, this bundle is marked as stopped and the Framework will remove
- * this bundle's listeners, unregister all services registered by this bundle, and release all services
- * used by this bundle.
+ *
+ * @param context The execution context of the bundle being started.
+ * @throws java.lang.Exception If this method throws an exception, this bundle is marked as stopped and the
+ * Framework will remove this bundle's listeners, unregister all services registered
+ * by this bundle, and release all services used by this bundle.
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
*/
@Override
public void start(BundleContext context) throws Exception {
logger.info("Starting bundle " + getName());
- String appName = "APPC: ";
+ String appName = "APPC: ";
logger.info(Msg.COMPONENT_INITIALIZING, appName, "Ansible Adapter");
- adapter = new AnsibleAdapterImpl();
-
+ adapter = new AnsibleAdapterImpl();
+
if (registration == null) {
logger.info(Msg.REGISTERING_SERVICE, appName, adapter.getAdapterName(),
- AnsibleAdapter.class.getSimpleName());
+ AnsibleAdapter.class.getSimpleName());
registration = context.registerService(AnsibleAdapter.class, adapter, null);
}
@@ -104,13 +99,11 @@ public class AnsibleActivator implements BundleActivator {
* <p>
* This method must complete and return to its caller in a timely manner.
* </p>
- *
- * @param context
- * The execution context of the bundle being stopped.
- * @throws java.lang.Exception
- * If this method throws an exception, the bundle is still marked as stopped, and the Framework will
- * remove the bundle's listeners, unregister all services registered by the bundle, and release all
- * services used by the bundle. *
+ *
+ * @param context The execution context of the bundle being stopped.
+ * @throws java.lang.Exception If this method throws an exception, the bundle is still marked as stopped, and the
+ * Framework will remove the bundle's listeners, unregister all services registered
+ * by the bundle, and release all services used by the bundle.
* @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
@Override
@@ -130,5 +123,4 @@ public class AnsibleActivator implements BundleActivator {
public String getName() {
return "APPC Ansible Adapter";
}
-
}