summaryrefslogtreecommitdiffstats
path: root/core/core-deployment/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/core-deployment/src')
-rw-r--r--core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/BatchDeployer.java2
-rw-r--r--core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/PeriodicEventManager.java66
2 files changed, 34 insertions, 34 deletions
diff --git a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/BatchDeployer.java b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/BatchDeployer.java
index 8bfb15025..b275c72ab 100644
--- a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/BatchDeployer.java
+++ b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/BatchDeployer.java
@@ -127,7 +127,7 @@ public class BatchDeployer {
* @throws IOException on IO exceptions from the operating system
*/
public void deployModel(final AxPolicyModel policyModel, final boolean ignoreConflicts, final boolean force)
- throws ApexException, IOException {
+ throws ApexException {
engineServiceFacade.deployModel(policyModel, ignoreConflicts, force);
}
diff --git a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/PeriodicEventManager.java b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/PeriodicEventManager.java
index a1db5ef07..5f0752aa0 100644
--- a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/PeriodicEventManager.java
+++ b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/PeriodicEventManager.java
@@ -41,39 +41,6 @@ public class PeriodicEventManager {
private EngineServiceFacade engineServiceFacade = null;
/**
- * The main method, reads the Apex server host address, port and location of the Apex model XML file from the
- * command line arguments.
- *
- * @param args the arguments that specify the Apex engine and the Apex model file
- */
- public static void main(final String[] args) {
- if (args.length != NUM_ARGUMENTS) {
- String message = "invalid arguments: " + Arrays.toString(args)
- + "\nusage: Deployer <server address> <port address> <start/stop> <periods in ms>";
- LOGGER.error(message);
- return;
- }
-
- PeriodicEventManager deployer = null;
- try {
- // Use a Deployer object to handle model deployment
- deployer = new PeriodicEventManager(args[0], Integer.parseInt(args[1]));
- deployer.init();
- if (args[2].equalsIgnoreCase("start")) {
- deployer.startPerioidicEvents(Long.parseLong(args[PERIODIC_EVENT_INTERVAL]));
- } else {
- deployer.stopPerioidicEvents();
- }
- } catch (final ApexException e) {
- LOGGER.error("model deployment failed on parameters {}", args, e);
- } finally {
- if (deployer != null) {
- deployer.close();
- }
- }
- }
-
- /**
* Instantiates a new deployer.
*
* @param hostName the host name of the host running the Apex Engine
@@ -121,4 +88,37 @@ public class PeriodicEventManager {
engineServiceFacade.stopPerioidicEvents(engineKey);
}
}
+
+ /**
+ * The main method, reads the Apex server host address, port and location of the Apex model XML file from the
+ * command line arguments.
+ *
+ * @param args the arguments that specify the Apex engine and the Apex model file
+ */
+ public static void main(final String[] args) {
+ if (args.length != NUM_ARGUMENTS) {
+ String message = "invalid arguments: " + Arrays.toString(args)
+ + "\nusage: Deployer <server address> <port address> <start/stop> <periods in ms>";
+ LOGGER.error(message);
+ return;
+ }
+
+ PeriodicEventManager deployer = null;
+ try {
+ // Use a Deployer object to handle model deployment
+ deployer = new PeriodicEventManager(args[0], Integer.parseInt(args[1]));
+ deployer.init();
+ if ("start".equalsIgnoreCase(args[2])) {
+ deployer.startPerioidicEvents(Long.parseLong(args[PERIODIC_EVENT_INTERVAL]));
+ } else {
+ deployer.stopPerioidicEvents();
+ }
+ } catch (final ApexException e) {
+ LOGGER.error("model deployment failed on parameters {}", args, e);
+ } finally {
+ if (deployer != null) {
+ deployer.close();
+ }
+ }
+ }
}