summaryrefslogtreecommitdiffstats
path: root/client/client-monitoring/src
diff options
context:
space:
mode:
Diffstat (limited to 'client/client-monitoring/src')
-rw-r--r--client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRest.java8
-rw-r--r--client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestMain.java16
-rw-r--r--client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestParameterException.java4
-rw-r--r--client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestParameterParser.java6
-rw-r--r--client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestParameters.java4
-rw-r--r--client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestResource.java18
-rw-r--r--client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ParameterCheck.java2
7 files changed, 30 insertions, 28 deletions
diff --git a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRest.java b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRest.java
index d6f7e64ad..e7802ae3f 100644
--- a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRest.java
+++ b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRest.java
@@ -38,16 +38,16 @@ public class ApexMonitoringRest {
private HttpServer server;
/**
- * Starts the HTTP server for the Apex services client on the default base URI and with the default REST packages
+ * Starts the HTTP server for the Apex services client on the default base URI and with the default REST packages.
*/
public ApexMonitoringRest() {
this(new ApexMonitoringRestParameters());
}
/**
- * Starts the HTTP server for the Apex services client
+ * Starts the HTTP server for the Apex services client.
*
- * @param parameters: The Apex parameters to use to start the server
+ * @param parameters The Apex parameters to use to start the server.
*/
public ApexMonitoringRest(final ApexMonitoringRestParameters parameters) {
Assertions.argumentNotNull(parameters, "parameters may not be null");
@@ -70,7 +70,7 @@ public class ApexMonitoringRest {
}
/**
- * Shut down the web server
+ * Shut down the web server.
*/
public void shutdown() {
logger.debug("Apex services RESTful client shutting down . . .");
diff --git a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestMain.java b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestMain.java
index fcc29ed29..bf2365f46 100644
--- a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestMain.java
+++ b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestMain.java
@@ -23,13 +23,15 @@ package org.onap.policy.apex.client.monitoring.rest;
import java.io.PrintStream;
/**
- * User: ewatkmi Date: 31 Jul 2017
+ * The main class for Apex Restful Monitoring.
+ *
+ * @author Michael Watkins (michael.watkins@ericsson.com)
*/
public class ApexMonitoringRestMain {
// Services state
public enum ServicesState {
STOPPED, READY, INITIALIZING, RUNNING
- };
+ }
private ServicesState state = ServicesState.STOPPED;
@@ -43,7 +45,7 @@ public class ApexMonitoringRestMain {
private ApexMonitoringRest apexMonitoringRest = null;
/**
- * Main method, main entry point for command
+ * Main method, main entry point for command.
*
* @param args The command line arguments for the client
*/
@@ -57,7 +59,7 @@ public class ApexMonitoringRestMain {
}
/**
- * Constructor, kicks off the rest service
+ * Constructor, kicks off the rest service.
*
* @param args The command line arguments for the RESTful service
* @param outStream The stream for output messages
@@ -95,7 +97,7 @@ public class ApexMonitoringRestMain {
}
/**
- * Initialize the rest service
+ * Initialize the rest service.
*/
public void init() {
outStream.println("Apex Services REST endpoint (" + this.toString() + ") starting at "
@@ -161,7 +163,7 @@ public class ApexMonitoringRestMain {
}
/**
- * Explicitly shut down the services
+ * Explicitly shut down the services.
*/
public void shutdown() {
if (apexMonitoringRest != null) {
@@ -173,7 +175,7 @@ public class ApexMonitoringRestMain {
}
/**
- * This class is a shutdown hook for the Apex services command
+ * This class is a shutdown hook for the Apex services command.
*/
private class ApexServicesShutdownHook implements Runnable {
/*
diff --git a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestParameterException.java b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestParameterException.java
index cbbc2940a..9ca309f13 100644
--- a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestParameterException.java
+++ b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestParameterException.java
@@ -21,9 +21,9 @@
package org.onap.policy.apex.client.monitoring.rest;
/**
- * A run time exception used to report parsing and parameter input errors
+ * A run time exception used to report parsing and parameter input errors.
*
- * User: ewatkmi Date: 31 Jul 2017
+ * @author Michael Watkins (michael.watkins@ericsson.com)
*/
public class ApexMonitoringRestParameterException extends IllegalArgumentException {
private static final long serialVersionUID = 6520231162404452427L;
diff --git a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestParameterParser.java b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestParameterParser.java
index 35ee6b4fa..af2ff6821 100644
--- a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestParameterParser.java
+++ b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestParameterParser.java
@@ -32,16 +32,16 @@ import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
/**
- * This class reads and handles command line parameters to the Apex RESTful services
+ * This class reads and handles command line parameters to the Apex RESTful services.
*
- * User: ewatkmi Date: 31 Jul 2017
+ * @author Michael Watkins (michael.watkins@ericsson.com)
*/
public class ApexMonitoringRestParameterParser {
// Apache Commons CLI options
Options options;
/**
- * Construct the options for the CLI RESTful services
+ * Construct the options for the CLI RESTful services.
*/
public ApexMonitoringRestParameterParser() {
options = new Options();
diff --git a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestParameters.java b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestParameters.java
index cb6d76fab..fea7ae4a8 100644
--- a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestParameters.java
+++ b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestParameters.java
@@ -23,9 +23,9 @@ package org.onap.policy.apex.client.monitoring.rest;
import java.net.URI;
/**
- * This class reads and handles command line parameters to the Apex RESTful services
+ * This class reads and handles command line parameters to the Apex RESTful services.
*
- * User: ewatkmi Date: 31 Jul 2017
+ * @author Michael Watkins (michael.watkins@ericsson.com)
*/
public class ApexMonitoringRestParameters {
public static final int DEFAULT_REST_PORT = 18989;
diff --git a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestResource.java b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestResource.java
index 84f29dfe2..6a614f326 100644
--- a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestResource.java
+++ b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestResource.java
@@ -81,7 +81,7 @@ public class ApexMonitoringRestResource {
public ApexMonitoringRestResource() {}
/**
- * Query the engine service for data
+ * Query the engine service for data.
*
* @param hostName the host name of the engine service to connect to.
* @param port the port number of the engine service to connect to.
@@ -163,7 +163,7 @@ public class ApexMonitoringRestResource {
}
/**
- * Start/Stop and Apex engine
+ * Start/Stop and Apex engine.
*
* @param hostName the host name of the engine service to connect to.
* @param port the port number of the engine service to connect to.
@@ -210,7 +210,7 @@ public class ApexMonitoringRestResource {
}
/**
- * Start/Stop and Apex engine
+ * Start/Stop and Apex engine.
*
* @param hostName the host name of the engine service to connect to.
* @param port the port number of the engine service to connect to.
@@ -252,7 +252,7 @@ public class ApexMonitoringRestResource {
}
/**
- * Check if periodic events are running
+ * Check if periodic events are running.
*
* @param host the engine's host url
* @return a boolean stating if periodic events are running for a given host
@@ -262,7 +262,7 @@ public class ApexMonitoringRestResource {
}
/**
- * Sets the state of periodic events for a host
+ * Sets the state of periodic events for a host.
*
* @param host the engine's host url
* @param boolean that states if periodic events have been started or stopped
@@ -273,7 +273,7 @@ public class ApexMonitoringRestResource {
/**
* This method takes in the latest data entry for an engine, adds it to an existing data set and returns the full
- * map for that host and engine
+ * map for that host and engine.
*
* @param host the engine's host url
* @param id the engines id
@@ -314,12 +314,12 @@ public class ApexMonitoringRestResource {
}
@Override
- public boolean add(final V e) {
+ public boolean add(final V elm) {
if (this.size() > (maxEntries - 1)) {
this.removeFirst();
}
- return super.add(e);
- };
+ return super.add(elm);
+ }
}
diff --git a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ParameterCheck.java b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ParameterCheck.java
index 8edeb54f1..5bc40c8db 100644
--- a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ParameterCheck.java
+++ b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ParameterCheck.java
@@ -49,7 +49,7 @@ public final class ParameterCheck {
START,
/** Stop of an Apex engine has been ordered. */
STOP
- };
+ }
private static final XLogger LOGGER = XLoggerFactory.getXLogger(ParameterCheck.class);