diff --git a/core_apps/sysmon/api/build.gradle b/core_apps/sysmon/api/build.gradle index 61e7518..b1e9ea7 100644 --- a/core_apps/sysmon/api/build.gradle +++ b/core_apps/sysmon/api/build.gradle @@ -3,3 +3,6 @@ */ group 'edu.upenn.cis.precise.openicelite.coreapps.sysmon' +dependencies { + testCompile group: 'junit', name: 'junit', version: '4.12' +} diff --git a/core_apps/sysmon/api/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/ChannelInfo.java b/core_apps/sysmon/api/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/ChannelInfo.java new file mode 100644 index 0000000..095a457 --- /dev/null +++ b/core_apps/sysmon/api/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/ChannelInfo.java @@ -0,0 +1,23 @@ +package edu.upenn.cis.precise.openicelite.coreapps.sysmon.api; + +/** + * A class that holds information about a channel + * + * @author Hyun Jung (hyju@seas.upenn.edu) + */ +public class ChannelInfo extends Info { + + public static final String[] required = { + "time", "name", "username", "connection", "state", "publish_rate", "publish_count", "messages_unacknowledged", + "deliver_get_rate", "deliver_get_count", "ack_rate", "ack_count", "redeliver_rate", "redeliver_count" + }; + + public ChannelInfo() { + super(); + } + + @Override + public String[] requiredFields() { + return required; + } +} diff --git a/core_apps/sysmon/api/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/ConnectionInfo.java b/core_apps/sysmon/api/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/ConnectionInfo.java new file mode 100644 index 0000000..2a9acb2 --- /dev/null +++ b/core_apps/sysmon/api/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/ConnectionInfo.java @@ -0,0 +1,22 @@ +package edu.upenn.cis.precise.openicelite.coreapps.sysmon.api; + +/** + * A class that holds information about a connection + * + * @author Hyun Jung (hyju@seas.upenn.edu) + */ +public class ConnectionInfo extends Info{ + + public static final String[] required = { + "time", "name", "username", "state", "ssl", "channels", + "recv_oct_rate", "recv_oct_count", "send_oct_rate", "send_oct_count" + }; + + @Override + public String[] requiredFields() { + return required; + } + + + +} diff --git a/core_apps/sysmon/api/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/DataListener.java b/core_apps/sysmon/api/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/DataListener.java new file mode 100644 index 0000000..502a84e --- /dev/null +++ b/core_apps/sysmon/api/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/DataListener.java @@ -0,0 +1,16 @@ +package edu.upenn.cis.precise.openicelite.coreapps.sysmon.api; + +import java.util.List; + +/** + * A listener interface for receiving periodic data + * + * @author Hyun Jung (hyju@seas.upenn.edu) + */ +public interface DataListener extends Listener { + /** + * Called when the requested metrics are received. + * @param data Metrics received + */ + void handleData(List data); +} diff --git a/core_apps/sysmon/api/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/EventListener.java b/core_apps/sysmon/api/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/EventListener.java new file mode 100644 index 0000000..84458f5 --- /dev/null +++ b/core_apps/sysmon/api/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/EventListener.java @@ -0,0 +1,24 @@ +package edu.upenn.cis.precise.openicelite.coreapps.sysmon.api; + +import java.util.List; + +/** + * A listener interface for receiving particular states or changes in data. + * + * @author Hyun Jung (hyju@seas.upenn.edu) + */ +public interface EventListener extends Listener { + + /** + * Specifies the condition to be notified with the metric. onConditionMet() will be called when this function returns true. + * @param data List of metrics to apply the condition onto + * @return Whether to notify the caller or not + */ + boolean apply(List data); + + /** + * Called when apply() returns true. + * @param data Data that satisfied the condition stated by apply() + */ + void onConditionMet(List data); +} diff --git a/core_apps/sysmon/api/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/ISysmon.java b/core_apps/sysmon/api/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/ISysmon.java new file mode 100644 index 0000000..c27f555 --- /dev/null +++ b/core_apps/sysmon/api/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/ISysmon.java @@ -0,0 +1,55 @@ +package edu.upenn.cis.precise.openicelite.coreapps.sysmon.api; + +import java.util.Properties; + +/** + * Interface to monitor system metrics + * + * @author Hyun Jung (hyju@seas.upenn.edu) + */ +public interface ISysmon { + + /** + * Initializes the system monitor with given options (properties). + * @param properties Parsed object of the properties file + */ + void init(Properties properties); + + /** + * Start receiving system metrics periodically. + */ + void start(); + + /** + * Stops receiving system metrics. + */ + void stop(); + + /** + * Adds the given metric to the list of metrics to request on the next interval. + * @param metric Name of the metric to request + */ + void addMonitor(String metric); + + /** + * Adds the given metric to the list of metrics to request on the next interval. + * @param metric Enum of the metric to request + */ + void addMonitor(Metric metric); + + /** + * Attaches a listener to the specified metric. Starts monitoring the metric if + * the monitor doesn't already + * @param metric Name of the metric to attach the listener to + * @param listener The listener to be added + */ + void addListener(String metric, Listener listener); + + /** + * Attaches a listener to the specified metric. Starts monitoring the metric if + * the monitor doesn't already + * @param metric Enum of the metric to attach the listener to + * @param listener The listener to be added + */ + void addListener(Metric metric, Listener listener); +} diff --git a/core_apps/sysmon/api/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/Info.java b/core_apps/sysmon/api/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/Info.java new file mode 100644 index 0000000..9a8436b --- /dev/null +++ b/core_apps/sysmon/api/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/Info.java @@ -0,0 +1,102 @@ +package edu.upenn.cis.precise.openicelite.coreapps.sysmon.api; + +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +/** + * A class the represents data from the system monitor + * + * @author Hyun Jung (hyju@seas.upenn.edu) + */ +public class Info { + private HashMap content; + + public Info() { + content = new HashMap<>(); + guarantee(); + } + + /** + * Populates the required fields with empty strings, making sure that the required fields exist + */ + private void guarantee() { + for (String s : requiredFields()) { + content.put(s, ""); + } + } + + /** + * Returns a list of fields guaranteed to exist for this data. + * @return String array of the names of the guaranteed fields + */ + public String[] requiredFields() { + return new String[0]; + } + + /** + * Returns whether this Info contains the specified field. + * @param field Name of the field to look for + * @return True if this info contains the field; false otherwise. + */ + public boolean containsField(String field) { + return content.containsKey(field); + } + + /** + * Adds a field and a value to the instance. Both the field and the value cannot be null. + * @param field Name of the field to add + * @param value Value of the field + */ + public void add(String field, Object value) { + if (field == null || value == null) { + throw new NullPointerException("Field and value cannot be null"); + } + content.put(field, value); + } + + /** + * Returns the value of the field given as a String, or an empty string if the field doesn't exist. + * @param field Name of the field to find + * @return Value of the field as a string, or null if the field doesn't exist + */ + public String getAsString(String field) { + if (content.containsKey(field)) { + return content.get(field).toString(); + } + return ""; + } + + /** + * Returns the value of the field given as a long, or 0 if the field doesn't exist. + * @param field Name of the field to find + * @return value of the field as a Long, or null if the field doesn't exist + */ + public long getAsLong(String field) { + if (content.containsKey(field) && (content.get(field) instanceof Long)) { + return (Long) content.get(field); + } + return 0; + } + + /** + * Returns the value of the field given as a double, or 0 if the field doesn't exist. + * @param field Name of the field to find + * @return value of the field as a double, or null if the field doesn't exist + */ + public double getAsDouble(String field) { + if (content.containsKey(field) && (content.get(field) instanceof Double)) { + return (Double) content.get(field); + } + return 0; + } + + /** + * Returns all data in this Info as a map. + * @return Map representation of all data + */ + public Map getMap() { + return Collections.unmodifiableMap(content); + } + +} diff --git a/core_apps/sysmon/api/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/Listener.java b/core_apps/sysmon/api/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/Listener.java new file mode 100644 index 0000000..749b3ad --- /dev/null +++ b/core_apps/sysmon/api/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/Listener.java @@ -0,0 +1,14 @@ +package edu.upenn.cis.precise.openicelite.coreapps.sysmon.api; + +/** + * A listener interface for receiving data from the system monitor. + * + * @author Hyun Jung (hyju@seas.upenn.edu) + */ +public interface Listener { + + /** + * Called when no data is available for the requested metric. + */ + void onNotAvailable(); +} diff --git a/core_apps/sysmon/api/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/Metric.java b/core_apps/sysmon/api/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/Metric.java new file mode 100644 index 0000000..14a5648 --- /dev/null +++ b/core_apps/sysmon/api/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/Metric.java @@ -0,0 +1,9 @@ +package edu.upenn.cis.precise.openicelite.coreapps.sysmon.api; + +/** + * An empty interface that all metric enums are required to implement. + * + * @author Hyun Jung (hyju@seas.upenn.edu) + */ +public interface Metric { +} diff --git a/core_apps/sysmon/api/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/MetricType.java b/core_apps/sysmon/api/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/MetricType.java new file mode 100644 index 0000000..83ad8b2 --- /dev/null +++ b/core_apps/sysmon/api/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/MetricType.java @@ -0,0 +1,11 @@ +package edu.upenn.cis.precise.openicelite.coreapps.sysmon.api; + +/** + * An Enum class specifying the metrics that all implementation of sysmon API are required to supply. + * + * @author Hyun Jung (hyju@seas.upenn.edu) + */ +public enum MetricType implements Metric { + CONNECTIONS, + CHANNELS, +} diff --git a/core_apps/sysmon/api/src/test/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/InfoTest.java b/core_apps/sysmon/api/src/test/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/InfoTest.java new file mode 100644 index 0000000..0ca01bf --- /dev/null +++ b/core_apps/sysmon/api/src/test/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/InfoTest.java @@ -0,0 +1,7 @@ +package edu.upenn.cis.precise.openicelite.coreapps.sysmon.api; + +import static org.junit.Assert.*; + +public class InfoTest { + +} \ No newline at end of file diff --git a/core_apps/sysmon/mqtt/build.gradle b/core_apps/sysmon/mqtt/build.gradle new file mode 100644 index 0000000..1299c9c --- /dev/null +++ b/core_apps/sysmon/mqtt/build.gradle @@ -0,0 +1,11 @@ +group 'edu.upenn.cis.precise.openicelite.coreapps.sysmon' + +dependencies { + compile project(':core_apps:sysmon:api') + compile 'org.apache.httpcomponents:httpclient:4.5.5' + compile group: 'com.google.code.gson', name: 'gson', version: '2.8.5' + compile group: 'org.xerial', name: 'sqlite-jdbc', version: '3.23.1' + + testCompile group: 'junit', name: 'junit', version: '4.12' + testCompile 'org.apache.httpcomponents:httpclient:4.5.5:tests' +} diff --git a/core_apps/sysmon/mqtt/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/DbConn.java b/core_apps/sysmon/mqtt/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/DbConn.java new file mode 100644 index 0000000..7268981 --- /dev/null +++ b/core_apps/sysmon/mqtt/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/DbConn.java @@ -0,0 +1,191 @@ +package edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt; + +import edu.upenn.cis.precise.openicelite.coreapps.sysmon.api.ChannelInfo; +import edu.upenn.cis.precise.openicelite.coreapps.sysmon.api.ConnectionInfo; +import edu.upenn.cis.precise.openicelite.coreapps.sysmon.api.Info; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import java.sql.*; +import java.util.List; + +public class DbConn { + private static Logger logger = LogManager.getLogger(DbConn.class); + + private Connection conn; + private String url; + + protected DbConn(String fileName) { + this.url = "jdbc:sqlite:" + fileName; + } + + /** + * Connects to the database file + */ + protected void connect() { + try { + conn = DriverManager.getConnection(url); + logger.info("Connection to db established: {}]", url); + } catch (SQLException e) { + logger.error("Error connecting to database ", e); + } + } + + /** + * Disconnects from the database file. + */ + protected void disconnect() { + try { + if (conn != null) { + conn.close(); + logger.info("Connection to database closed"); + } + } catch (SQLException e) { + logger.error("Error while disconnecting from database ", e); + } + } + + /** + * Creates (if not exists) a table that can store ConnectionInfo + */ + protected void createConnectionTable() { + String sql = "CREATE TABLE IF NOT EXISTS connections (\n" + + " id integer PRIMARY KEY, \n" + + " time text NOT NULL,\n" + + " name text, \n" + + " username text, \n" + + " state text, \n" + + " ssl text, \n" + + " channels integer, \n" + + " recv_oct_rate real, \n" + + " recv_oct_count integer, \n" + + " send_oct_rate real, \n" + + " send_oct_count integer \n" + + ");"; + try { + Statement st = conn.createStatement(); + st.execute(sql); + } catch (SQLException e) { + logger.error("Error while creating table connections", e); + } + } + + /** + * Inserts the given ConnectionInfo into connections table. + * @param info ConnectionInfo object to insert + */ + protected void insertConnectionInfo(ConnectionInfo info) { + String sql = "INSERT INTO connections(time, name, username, state, ssl, channels," + + "recv_oct_rate, recv_oct_count, send_oct_rate, send_oct_count)" + + " VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; + try { + PreparedStatement pst = conn.prepareStatement(sql); + pst.setString(1, info.getAsString("time")); + pst.setString(2, info.getAsString("name")); + pst.setString(3, info.getAsString("username")); + pst.setString(4, info.getAsString("state")); + pst.setString(5, info.getAsString("ssl")); + pst.setLong (6, info.getAsLong("channels")); + pst.setDouble(7, info.getAsDouble("recv_oct_rate")); + pst.setLong (8, info.getAsLong("recv_oct_count")); + pst.setDouble(9, info.getAsDouble("send_oct_rate")); + pst.setLong (10, info.getAsLong("send_oct_count")); + pst.execute(); + } catch (SQLException e) { + logger.error("Error while inserting to table connections", e); + } + } + + /** + * Convenience method to insert a list of ConnectionInfo + * @param infoList List of ConnectionInfo to insert + */ + protected void insertConnectionList(List infoList) { + for (Info info : infoList) { + insertConnectionInfo((ConnectionInfo) info); + } + } + + /** + * Creates (if not exists) a table that can store ChannelInfo + */ + protected void createChannelTable() { + String sql = "CREATE TABLE IF NOT EXISTS channels (\n" + + " id integer PRIMARY KEY, \n" + + " time text NOT NULL, \n" + + " name text, \n" + + " username text, \n" + + " connection text, \n" + + " state text, \n" + + " publish_rate real, \n" // publisher metrics + + " publish_count integer, \n" + + " messages_unacknowledged integer, \n" + + " deliver_get_rate real, \n" // subscriber metrics + + " deliver_get_count integer, \n" + + " ack_rate real, \n" + + " ack_count integer, \n" + + " redeliver_rate real, \n" + + " redeliver_count integer \n" + + ");"; + try { + Statement st = conn.createStatement(); + st.execute(sql); + } catch (SQLException e) { + logger.error("Error while creating table", e); + } + } + + /** + * Inserts the given ChannelInfo object into table + * @param info ChannelInfo to insert + */ + protected void insertChannelInfo(ChannelInfo info) { + String sql = "INSERT INTO channels (time, name, username, connection, state," + + " publish_rate, publish_count, messages_unacknowledged," + + " deliver_get_rate, deliver_get_count, ack_rate, ack_count, redeliver_rate, redeliver_count)" + + " VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; + try { + PreparedStatement pst = conn.prepareStatement(sql); + pst.setString(1, info.getAsString("time")); + pst.setString(2, info.getAsString("name")); + pst.setString(3, info.getAsString("username")); + pst.setString(4, info.getAsString("connection")); + pst.setString(5, info.getAsString("state")); + pst.setDouble(6, info.getAsDouble("publish_rate")); + pst.setLong (7, info.getAsLong("publish_count")); + pst.setLong (8, info.getAsLong("messages_unacknowledged")); + pst.setDouble(9, info.getAsDouble("deliver_get_rate")); + pst.setLong (10, info.getAsLong("deliver_get_count")); + pst.setDouble(11, info.getAsDouble("ack_rate")); + pst.setLong (12, info.getAsLong("ack_count")); + pst.setDouble(13, info.getAsDouble("redeliver_rate")); + pst.setLong (14, info.getAsLong("redeliver_count")); + pst.execute(); + } catch (SQLException e) { + logger.error("Error while inserting to table channels", e); + } + } + + /** + * Convenience method to insert a list of ChanneInfo + * @param infoList List of ChannelInfo to insert + */ + protected void insertChannelList(List infoList) { + for (Info info : infoList) { + insertChannelInfo((ChannelInfo) info); + } + } + + /** + * Convenience methods to insert a list of Info + * @param m Name of metric that the list holds + * @param infoList List to insert + */ + protected void insertList(String m, List infoList) { + if ("connections".equals(m)) { + insertConnectionList(infoList); + } else if ("channels".equals(m)) { + insertChannelList(infoList); + } + } +} diff --git a/core_apps/sysmon/mqtt/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/HttpConn.java b/core_apps/sysmon/mqtt/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/HttpConn.java new file mode 100644 index 0000000..3de5eae --- /dev/null +++ b/core_apps/sysmon/mqtt/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/HttpConn.java @@ -0,0 +1,65 @@ +package edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt; + +import java.io.IOException; +import java.io.InputStreamReader; + +import org.apache.http.HttpEntity; +import org.apache.http.StatusLine; +import org.apache.http.auth.AuthScope; +import org.apache.http.auth.UsernamePasswordCredentials; +import org.apache.http.client.CredentialsProvider; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.impl.client.BasicCredentialsProvider; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import com.google.gson.JsonElement; +import com.google.gson.JsonParser; + +class HttpConn { + private static Logger logger = LogManager.getLogger(HttpConn.class); + + private CloseableHttpClient client; + private String brokerAddr; + + protected HttpConn(String host, int port, String user, String password) { + if (host == null) throw new NullPointerException("Host may not be null"); + if (user == null) throw new NullPointerException("Username may not be null"); + if (port < 0 || port > 65535) throw new IllegalArgumentException("Port must be between 0 and 65535"); + + this.brokerAddr = "http://" + host + ":" + port + "/api/"; + CredentialsProvider credsProvider = new BasicCredentialsProvider(); + credsProvider.setCredentials( + new AuthScope(host, port), + new UsernamePasswordCredentials(user, password)); + client = HttpClients.custom() + .setDefaultCredentialsProvider(credsProvider) + .build(); + } + + /** + * Sends a GET request for the specified metric to the broker + * @param metric Metric to request + * @return Json response from the broker, or null if no json was received. + * @throws IOException + */ + protected JsonElement get(String metric) throws IOException { + if (metric == null) throw new NullPointerException("Metric may not be null"); + HttpGet getReq = new HttpGet(brokerAddr + metric); + CloseableHttpResponse response1 = client.execute(getReq); + StatusLine status = response1.getStatusLine(); + + if (status.getStatusCode() != 200) { + logger.warn("No metric received: {} {}", status.getStatusCode(), status.getReasonPhrase()); + return null; + } + + HttpEntity entity1 = response1.getEntity(); + JsonParser parser = new JsonParser(); + return parser.parse(new InputStreamReader(entity1.getContent())); + } + +} \ No newline at end of file diff --git a/core_apps/sysmon/mqtt/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/InfoParser.java b/core_apps/sysmon/mqtt/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/InfoParser.java new file mode 100644 index 0000000..24ee8e1 --- /dev/null +++ b/core_apps/sysmon/mqtt/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/InfoParser.java @@ -0,0 +1,120 @@ +package edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt; + +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import edu.upenn.cis.precise.openicelite.coreapps.sysmon.api.*; + +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +public class InfoParser { + private static DateTimeFormatter timeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); + private static LocalDateTime time; + + /** + * Parses an array of json objects into a list of Info objects. + * @param metric Metric to use when parsing the array + * @param array Json array to parse + * @return List of parsed Info objects + */ + protected static List parseList(String metric, JsonArray array) { + if (!MqttSysmon.enumMap.containsValue(metric)) { + throw new IllegalArgumentException("Unsupported metric"); + } + List result = new ArrayList<>(); + Iterator it = array.iterator(); + time = LocalDateTime.now(); + while (it.hasNext()) { + JsonElement e = it.next(); + if (e.isJsonObject()) { + JsonObject object = e.getAsJsonObject(); + if (metric.equals("connections")) { + result.add(parseConnection(object)); + } else if (metric.equals("channels")) { + result.add(parseChannel(object)); + } + } + } + return result; + } + + /** + * Parses a single json object into a ConnectionInfo + * @param object Json object to parse + * @return ConnectionInfo holding the parsed information + */ + private static ConnectionInfo parseConnection(JsonObject object) { + ConnectionInfo result = new ConnectionInfo(); + result.add("time", timeFormatter.format(time)); + result.add("name", getAsString(object, "name")); + result.add("username", getAsString(object, "user")); + result.add("state", getAsString(object,"state")); + result.add("ssl", getAsString(object, "ssl")); + result.add("channels", getAsLong(object, "channels")); + addCountRate(result, object, "recv_oct"); + addCountRate(result, object, "send_oct"); + + return result; + } + + /** + * Parses a single json object into a ChannelInfo + * @param object Json object to parse + * @return ChannelInfo holding the parsed information + */ + private static ChannelInfo parseChannel(JsonObject object) { + ChannelInfo result = new ChannelInfo(); + result.add("time", timeFormatter.format(time)); + result.add("name", getAsString(object, "name")); + result.add("username", getAsString(object, "user")); + result.add("state", getAsString(object, "state")); + result.add("messages_unacknowledged", getAsLong(object, "messages_unacknowledged")); + + if (object.has("connection_details")) { + result.add("connection", getAsString(object.getAsJsonObject("connection_details"), "name")); + } + + if (object.has("message_stats")) { + JsonObject messageStats = object.getAsJsonObject("message_stats"); + addCountRate(result, messageStats, "publish"); + addCountRate(result, messageStats, "deliver_get"); + addCountRate(result, messageStats, "ack"); + addCountRate(result, messageStats, "redeliver"); + } + return result; + } + + private static void addCountRate(Info result, JsonObject object, String field) { + result.add(field + "_count", getAsLong(object, field)); + if (object.has(field + "_details")) { + result.add(field + "_rate", getAsDouble(object.getAsJsonObject(field + "_details"), "rate")); + } else { + result.add(field + "_rate", 0); + } + } + + private static double getAsDouble(JsonObject object, String field) { + if (object.has(field)) { + return object.getAsJsonPrimitive(field).getAsDouble(); + } + return 0; + } + + private static long getAsLong(JsonObject object, String field) { + if (object.has(field)) { + return object.getAsJsonPrimitive(field).getAsLong(); + } + return 0; + } + + private static String getAsString(JsonObject object, String field) { + if (object.has(field)) { + return object.getAsJsonPrimitive(field).getAsString(); + } + return ""; + } +} diff --git a/core_apps/sysmon/mqtt/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/MqttMetricType.java b/core_apps/sysmon/mqtt/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/MqttMetricType.java new file mode 100644 index 0000000..133dc35 --- /dev/null +++ b/core_apps/sysmon/mqtt/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/MqttMetricType.java @@ -0,0 +1,9 @@ +package edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt; + +import edu.upenn.cis.precise.openicelite.coreapps.sysmon.api.Metric; + +/** + * Metrics provided in addition to those specified in {@link edu.upenn.cis.precise.openicelite.coreapps.sysmon.api.MetricType} + */ +public enum MqttMetricType implements Metric { +} diff --git a/core_apps/sysmon/mqtt/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/MqttSysmon.java b/core_apps/sysmon/mqtt/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/MqttSysmon.java new file mode 100644 index 0000000..10c47d0 --- /dev/null +++ b/core_apps/sysmon/mqtt/src/main/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/MqttSysmon.java @@ -0,0 +1,216 @@ +package edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt; + +import java.io.IOException; +import java.util.*; + +import edu.upenn.cis.precise.openicelite.coreapps.sysmon.api.*; +import edu.upenn.cis.precise.openicelite.coreapps.sysmon.api.EventListener; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import com.google.gson.JsonArray; + +/** + * MQTT implementation of the system monitor interface. This class periodically requests system metric + * from the broker and deliver the data to the client. + * @author Hyun Ji Jung + */ +public class MqttSysmon implements ISysmon { + + private static Logger logger = LogManager.getLogger(MqttSysmon.class); + static final Map enumMap = Collections.unmodifiableMap( + new HashMap() {{ + put(MetricType.CHANNELS, "channels"); + put(MetricType.CONNECTIONS, "connections"); + }} + ); + + private HttpConn conn; + private ArrayList metrics; + private HashMap> eventListeners; + private HashMap> dataListeners; + + private DbConn dbConn; + private long interval; + private Timer timer; + + // default constructor for testing + protected MqttSysmon() {} + + public MqttSysmon(Properties properties) { + init(properties); + } + + @Override + public void init(Properties properties) { + String host = properties.getProperty("host", "localhost"); + int port = Integer.parseInt(properties.getProperty("port", "15672")); + String dbFile = properties.getProperty("db", "logs/metrics.db"); + int interval = Integer.parseInt(properties.getProperty("interval", "5000")); + String user = properties.getProperty("user","guest"); + String password = properties.getProperty("password", "guest"); + + conn = new HttpConn(host, port, user, password); + dbConn = new DbConn(dbFile); + createTables(); + metrics = new ArrayList<>(); + eventListeners = new HashMap<>(); + dataListeners = new HashMap<>(); + setInterval(interval); + } + + private void createTables() { + dbConn.connect(); + dbConn.createConnectionTable(); + dbConn.createChannelTable(); + dbConn.disconnect(); + } + + protected void setInterval(long interval) { + if (interval <= 0) { + throw new IllegalArgumentException("Collection interval must be greater than zero"); + } + this.interval = interval; + logger.info("Collection interval changed to {}", interval); + } + + @Override + public void start() { + timer = new Timer(); + timer.scheduleAtFixedRate(new GetDataTask(), 0, interval); + logger.info("Started collecting metrics with interval {}", interval); + } + + @Override + public void stop() { + timer.cancel(); + logger.info("Stopped collecting metrics"); + } + + @Override + public void addMonitor(String metric) { + if (!enumMap.containsValue(metric)) { + throw new IllegalArgumentException("Unsupported metric: " + metric); + } + metrics.add(metric); + logger.info("Started monitoring {}", metric); + } + + @Override + public void addMonitor(Metric metric) { + if (!enumMap.containsKey(metric)) { + throw new IllegalArgumentException("Unsupported metric"); + } + addMonitor(enumMap.get(metric)); + } + + @Override + public void addListener(String metric, Listener listener) { + if (!enumMap.containsValue(metric)) { + throw new IllegalArgumentException("Unsupported metric"); + } + if (listener instanceof DataListener) { + addDataListener(metric, (DataListener) listener); + } else if (listener instanceof EventListener) { + addEventListener(metric, (EventListener) listener); + } + } + + @Override + public void addListener(Metric metric, Listener listener) { + if (!enumMap.containsKey(metric)) { + throw new IllegalArgumentException("Unsupported metric"); + } + addListener(enumMap.get(metric), listener); + } + + private void addDataListener(String metric, DataListener listener) { + if (dataListeners.containsKey(metric)) { + dataListeners.get(metric).add(listener); + } else { + ArrayList ls = new ArrayList<>(); + ls.add(listener); + dataListeners.put(metric, ls); + } + logger.info("DataListener attached to {}", metric); + } + + private void addEventListener(String metric, EventListener listener) { + if (eventListeners.containsKey(metric)) { + eventListeners.get(metric).add(listener); + } else { + ArrayList ls = new ArrayList<>(); + ls.add(listener); + eventListeners.put(metric, ls); + } + logger.info("EventListener attached to {}", metric); + } + + /** + * Sends a request to the broker for the specified metrics. + * @param metric Metric to request + * @return Metrics received from the broker + */ + private List requestInfoList(String metric) { + List result = new ArrayList<>(); + JsonArray array; + try { + array = conn.get(metric).getAsJsonArray(); + if (array == null) { + // means that no data was returned from the server + return null; + } + } catch (IOException e) { + e.printStackTrace(); + logger.error("Error while communicating with broker: ", e); + return result; + } + return InfoParser.parseList(metric, array); + } + + private class GetDataTask extends TimerTask { + @Override + public void run() { + logger.info("Requesting metrics from broker"); + dbConn.connect(); + for (String m : metrics) { + List resp = requestInfoList(m); + if (resp == null) { + notifyNoData("metric"); + } else { + notifyListeners(m, resp); + dbConn.insertList(m, resp); + } + } + dbConn.disconnect(); + } + + private void notifyListeners(String metric, List response) { + if (dataListeners.containsKey(metric)) { + for (DataListener i : dataListeners.get(metric)) { + i.handleData(response); + } + } + if (eventListeners.containsKey(metric)) { + for (EventListener i : eventListeners.get(metric)) { + if (i.apply(response)) { + i.onConditionMet(response); + } + } + } + } + + private void notifyNoData(String metric) { + if (dataListeners.containsKey(metric)) { + for (DataListener i : dataListeners.get(metric)) { + i.onNotAvailable(); + } + } + if (eventListeners.containsKey(metric)) { + for (EventListener i : eventListeners.get(metric)) { + i.onNotAvailable(); + } + } + } + } +} diff --git a/core_apps/sysmon/mqtt/src/main/resources/log4j2.properties b/core_apps/sysmon/mqtt/src/main/resources/log4j2.properties new file mode 100644 index 0000000..fdea955 --- /dev/null +++ b/core_apps/sysmon/mqtt/src/main/resources/log4j2.properties @@ -0,0 +1,44 @@ +name=OpenICE-lite sysmon Log Properties +property.dir=logs + +appender.console.type=Console +appender.console.name=STDOUT +appender.console.layout.type=PatternLayout +appender.console.layout.pattern=[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} %c{1} - %msg%n +#appender.console.filter.threshold.type=ThresholdFilter +#appender.console.filter.threshold.level=info + +appender.sysmon.type=RollingFile +appender.sysmon.name=Sysmon +appender.sysmon.fileName=${dir}/sysmon.log +appender.sysmon.filePattern=${dir}/root-%d{yyyy-MM-dd-HH}-%i.log.gz +appender.sysmon.layout.type=PatternLayout +appender.sysmon.layout.pattern=[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} %c{2} - %msg%n +appender.sysmon.policies.type=Policies +appender.sysmon.policies.size.type=SizeBasedTriggeringPolicy +appender.sysmon.policies.size.size=10MB +appender.sysmon.strategy.type=DefaultRolloverStrategy +appender.sysmon.strategy.max=20 + +appender.mqtt.type=RollingFile +appender.mqtt.name=MQTT +appender.mqtt.fileName=${dir}/mqtt.log +appender.mqtt.filePattern=${dir}/root-%d{yyyy-MM-dd-HH}-%i.log.gz +appender.mqtt.layout.type=PatternLayout +appender.mqtt.layout.pattern=[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} %c{2} - %msg%n +appender.mqtt.policies.type=Policies +appender.mqtt.policies.size.type=SizeBasedTriggeringPolicy +appender.mqtt.policies.size.size=10MB +appender.mqtt.strategy.type=DefaultRolloverStrategy +appender.mqtt.strategy.max=20 + +logger.sysmon.name=edu.upenn.cis.precise.openicelite.coreapps.sysmon.api +logger.sysmon.level=info +logger.sysmon.appenderRef.rolling.ref=Sysmon +logger.sysmon.appenderRef.console.ref=STDOUT + +logger.mqtt.name=edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt +logger.mqtt.level=info +#logger.mqtt.additivity=info +logger.mqtt.appenderRef.rolling.ref=MQTT +logger.mqtt.appenderRef.console.ref=STDOUT diff --git a/core_apps/sysmon/mqtt/src/test/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/DbConnTest.java b/core_apps/sysmon/mqtt/src/test/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/DbConnTest.java new file mode 100644 index 0000000..570f325 --- /dev/null +++ b/core_apps/sysmon/mqtt/src/test/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/DbConnTest.java @@ -0,0 +1,7 @@ +package edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt; + +import static org.junit.Assert.*; + +public class DbConnTest { + +} \ No newline at end of file diff --git a/core_apps/sysmon/mqtt/src/test/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/HttpConnTest.java b/core_apps/sysmon/mqtt/src/test/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/HttpConnTest.java new file mode 100644 index 0000000..0d2a68a --- /dev/null +++ b/core_apps/sysmon/mqtt/src/test/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/HttpConnTest.java @@ -0,0 +1,103 @@ +package edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt; + +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import org.apache.http.*; +import org.apache.http.config.SocketConfig; +import org.apache.http.entity.BasicHttpEntity; +import org.apache.http.impl.bootstrap.ServerBootstrap; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; +import org.apache.http.localserver.LocalServerTestBase; +import org.apache.http.protocol.HttpContext; +import org.apache.http.protocol.HttpRequestHandler; +import org.junit.Test; + +import java.io.ByteArrayInputStream; +import java.io.IOException; + +import static org.junit.Assert.assertEquals; + + +public class HttpConnTest extends LocalServerTestBase { + private HttpConn conn; + + @Override + public void setUp() throws Exception { + final SocketConfig socketConfig = SocketConfig.custom() + .setSoTimeout(15000) + .build(); + this.serverBootstrap = ServerBootstrap.bootstrap() + .setSocketConfig(socketConfig) + .setServerInfo(ORIGIN) + .registerHandler("*", new TestHandler()); + this.connManager = new PoolingHttpClientConnectionManager(); + this.clientBuilder = HttpClientBuilder.create() + .setDefaultSocketConfig(socketConfig) + .setConnectionManager(this.connManager); + } + + @Test(expected = NullPointerException.class) + public void constructor_nullHost_NPE() { + conn = new HttpConn(null, 15672, "", ""); + } + + @Test(expected = NullPointerException.class) + public void constructor_nullUser_NPE() { + conn = new HttpConn("localhost", 15672, null, ""); + } + + // Allow null passwords + + @Test(expected = IllegalArgumentException.class) + public void constructor_negPort_IllegalArgumentException() { + conn = new HttpConn("localhost", -1212, "", ""); + } + + @Test(expected = IllegalArgumentException.class) + public void constructor_portTooLarge_IllegalArgumentException() { + conn = new HttpConn("localhost", 65536, "", ""); + } + + @Test(expected = NullPointerException.class) + public void get_nullMetric_NPE() throws IOException { + conn = new HttpConn("localhost", 15672, "guest", "guest"); + conn.get(null); + } + + @Test + public void get_errorResponse_returnNull() throws IOException { + conn = getTestConn(); + assertEquals(null, conn.get("400")); + } + + @Test + public void get_okResponse_returnParsedJson() throws IOException{ + conn = getTestConn(); + JsonElement resp = conn.get("200"); + JsonObject expected = new JsonObject(); + expected.addProperty("dummy", 1234); + assertEquals(expected, resp); + } + + private HttpConn getTestConn() { + try { + this.start(); + } catch (Exception e) { + e.printStackTrace(); + } + return new HttpConn("localhost", this.server.getLocalPort(), "", ""); + } + + private class TestHandler implements HttpRequestHandler { + // Uri: "/api/statusCode" + @Override + public void handle(HttpRequest request, HttpResponse response, HttpContext context) throws HttpException, IOException { + String[] s = request.getRequestLine().getUri().split("/"); + BasicHttpEntity entity = new BasicHttpEntity(); + response.setStatusCode(Integer.parseInt(s[2])); + entity.setContent(new ByteArrayInputStream("{dummy:1234}".getBytes())); + response.setEntity(entity); + } + } +} \ No newline at end of file diff --git a/core_apps/sysmon/mqtt/src/test/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/InfoParserTest.java b/core_apps/sysmon/mqtt/src/test/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/InfoParserTest.java new file mode 100644 index 0000000..ff1dd4c --- /dev/null +++ b/core_apps/sysmon/mqtt/src/test/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/InfoParserTest.java @@ -0,0 +1,96 @@ +package edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt; + +import com.google.gson.*; +import edu.upenn.cis.precise.openicelite.coreapps.sysmon.api.Info; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.util.List; + +import static org.junit.Assert.*; + +public class InfoParserTest { + private static JsonObject sampleConnection; + private static JsonObject sampleChannel; + private List result; + private JsonArray array; + + @BeforeClass + public static void setupSample() throws IOException { + JsonParser parser = new JsonParser(); + JsonElement e = parser.parse(new FileReader(new File("src/test/resources/sampleConnection.json"))); + sampleConnection = e.getAsJsonObject(); + e = parser.parse(new FileReader(new File("src/test/resources/sampleChannel.json"))); + sampleChannel = e.getAsJsonObject(); + } + + @Before + public void init() { + array = new JsonArray(); + } + + @Test(expected = IllegalArgumentException.class) + public void parseList_nullMetric_NPE() { + InfoParser.parseList(null, new JsonArray()); + } + + @Test(expected = IllegalArgumentException.class) + public void parseList_unsupportedMetric_IllegalArgumentException() { + InfoParser.parseList("blahhh", new JsonArray()); + } + + @Test(expected = NullPointerException.class) + public void parseList_nullArray_NPE() { + InfoParser.parseList("connections", null); + } + + @Test + public void parseList_emptyArray_returnEmptyList() { + result = InfoParser.parseList("connections", new JsonArray()); + assertEquals(0, result.size()); + } + + @Test + public void parseList_arrayContainsPrimitive_ignorePrimitive() { + array.add(sampleConnection); + array.add(new JsonPrimitive("primitive")); + result = InfoParser.parseList("connections", array); + assertEquals(1, result.size()); + assertEquals("127.0.0.1:6532 -> 127.0.0.1:1883", result.get(0).getAsString("name")); + } + + @Test + public void getAsX_missingField_fillEmptyValue() { + JsonObject object = sampleConnection.deepCopy(); + object.remove("name"); + array.add(object); + result = InfoParser.parseList("connections", array); + assertEquals(1, result.size()); + assertEquals("", result.get(0).getAsString("name")); + } + + @Test + public void addCountRate_missingCount_fillEmptyValue() { + JsonObject object = sampleChannel.deepCopy(); + System.out.println(object.entrySet()); + object.getAsJsonObject("message_stats").remove("deliver_get"); + array.add(object); + result = InfoParser.parseList("channels", array); + assertEquals(0, result.get(0).getAsLong("deliver_get_count")); + } + + @Test + public void addCountRate_missingRate_fillEmptyValue() { + JsonObject object = sampleChannel.deepCopy(); + object.getAsJsonObject("message_stats").getAsJsonObject("ack_details") + .remove("rate"); + array.add(object); + result = InfoParser.parseList("channels", array); + assertEquals(0, result.get(0).getAsDouble("ack_rate"), 0.001); + } + +} \ No newline at end of file diff --git a/core_apps/sysmon/mqtt/src/test/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/MqttSysmonTest.java b/core_apps/sysmon/mqtt/src/test/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/MqttSysmonTest.java new file mode 100644 index 0000000..d575f7a --- /dev/null +++ b/core_apps/sysmon/mqtt/src/test/java/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/MqttSysmonTest.java @@ -0,0 +1,40 @@ +package edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt; + +import org.junit.Before; +import org.junit.Test; + +import java.util.Properties; + +import static org.junit.Assert.*; + +public class MqttSysmonTest { + private MqttSysmon sysmon; + + @Before + public void initTest() { + sysmon = new MqttSysmon(); + } + + @Test(expected = NullPointerException.class) + public void init_nullArgument_NPEThrown() { + sysmon.init(null); + } + + @Test + public void init_emptyProperties_initByDefaultValues() { + + } + + @Test + public void init_someMissingProperties_fillWithDefault() { + + } + + @Test(expected = IllegalArgumentException.class) + public void setInterval_nonPositiveArgument_IllegalArgumentException() { + Properties p = new Properties(); + p.setProperty("interval", "0"); + sysmon.init(p); + } + +} \ No newline at end of file diff --git a/core_apps/sysmon/mqtt/src/test/resources/sampleChannel.json b/core_apps/sysmon/mqtt/src/test/resources/sampleChannel.json new file mode 100644 index 0000000..1af48e7 --- /dev/null +++ b/core_apps/sysmon/mqtt/src/test/resources/sampleChannel.json @@ -0,0 +1,64 @@ +{ + "reductions_details": { + "rate": 0.0 + }, + "reductions": 191697, + "message_stats": { + "deliver_get_details": { + "rate": 0.2 + }, + "deliver_get": 735, + "ack_details": { + "rate": 0.2 + }, + "ack": 735, + "redeliver_details": { + "rate": 0.0 + }, + "redeliver": 0, + "deliver_no_ack_details": { + "rate": 0.0 + }, + "deliver_no_ack": 0, + "deliver_details": { + "rate": 0.2 + }, + "deliver": 735, + "get_no_ack_details": { + "rate": 0.0 + }, + "get_no_ack": 0, + "get_details": { + "rate": 0.0 + }, + "get": 0 + }, + "user_who_performed_action": "guest", + "vhost": "/", + "user": "guest", + "number": 1, + "name": "127.0.0.1:6532 -\u003e 127.0.0.1:1883 (1)", + "node": "rabbit@DESKTOP-QJPD4FH", + "connection_details": { + "peer_host": "127.0.0.1", + "peer_port": 6532, + "name": "127.0.0.1:6532 -\u003e 127.0.0.1:1883" + }, + "garbage_collection": { + "minor_gcs": 353, + "fullsweep_after": 65535, + "min_heap_size": 233, + "min_bin_vheap_size": 46422, + "max_heap_size": 0 + }, + "state": "running", + "global_prefetch_count": 0, + "prefetch_count": 10, + "acks_uncommitted": 0, + "messages_uncommitted": 0, + "messages_unconfirmed": 0, + "messages_unacknowledged": 0, + "consumer_count": 1, + "confirm": false, + "transactional": false +} \ No newline at end of file diff --git a/core_apps/sysmon/mqtt/src/test/resources/sampleConnection.json b/core_apps/sysmon/mqtt/src/test/resources/sampleConnection.json new file mode 100644 index 0000000..638f464 --- /dev/null +++ b/core_apps/sysmon/mqtt/src/test/resources/sampleConnection.json @@ -0,0 +1,45 @@ +{ + "reductions_details": { + "rate": 137.2 + }, + "reductions": 595869, + "recv_oct_details": { + "rate": 0.0 + }, + "recv_oct": 202, + "send_oct_details": { + "rate": 1.8 + }, + "send_oct": 6438, + "ssl": false, + "client_properties": {}, + "frame_max": 0, + "channel_max": 1, + "channels": 1, + "variable_map": { + "client_id": "TestClient_sub1530210839307" + }, + "user_who_performed_action": "guest", + "node": "rabbit@DESKTOP-QJPD4FH", + "connected_at": 1530210839389, + "type": "direct", + "vhost": "/", + "user": "guest", + "peer_port": 6532, + "peer_host": "127.0.0.1", + "name": "127.0.0.1:6532 -\u003e 127.0.0.1:1883", + "port": 1883, + "host": "127.0.0.1", + "protocol": "MQTT 3.1.1", + "state": "running", + "garbage_collection": { + "minor_gcs": 448, + "fullsweep_after": 65535, + "min_heap_size": 233, + "min_bin_vheap_size": 46422, + "max_heap_size": 0 + }, + "send_pend": 0, + "send_cnt": 793, + "recv_cnt": 78 +} \ No newline at end of file diff --git a/docs/allclasses-frame.html b/docs/allclasses-frame.html index d406fcd..d313657 100644 --- a/docs/allclasses-frame.html +++ b/docs/allclasses-frame.html @@ -2,9 +2,9 @@ - -All Classes (OpenICE-lite 0.1.0 API) - + +All Classes (OpenICE-lite 0.1.3 API) + @@ -12,18 +12,31 @@

All Classes

    +
  • ChannelInfo
  • +
  • ConnectionInfo
  • +
  • DataListener
  • +
  • DbConn
  • DeviceInfo
  • Dongle
  • DongleInfo
  • DongleSimulator
  • +
  • EventListener
  • IDriver
  • IDriverCallback
  • IGracefulShutdown
  • IMiddleware
  • IMiddlewareCallback
  • +
  • Info
  • +
  • InfoParser
  • +
  • ISysmon
  • ITopicHandler
  • ITopicHandler.TopicType
  • +
  • Listener
  • LoggerH2
  • +
  • Metric
  • +
  • MetricType
  • +
  • MqttMetricType
  • +
  • MqttSysmon
  • ShutdownHook
  • SSLUtil
  • TopicHandler
  • diff --git a/docs/allclasses-noframe.html b/docs/allclasses-noframe.html index 98dcbed..eb94a7f 100644 --- a/docs/allclasses-noframe.html +++ b/docs/allclasses-noframe.html @@ -2,9 +2,9 @@ - -All Classes (OpenICE-lite 0.1.0 API) - + +All Classes (OpenICE-lite 0.1.3 API) + @@ -12,18 +12,31 @@

    All Classes

      +
    • ChannelInfo
    • +
    • ConnectionInfo
    • +
    • DataListener
    • +
    • DbConn
    • DeviceInfo
    • Dongle
    • DongleInfo
    • DongleSimulator
    • +
    • EventListener
    • IDriver
    • IDriverCallback
    • IGracefulShutdown
    • IMiddleware
    • IMiddlewareCallback
    • +
    • Info
    • +
    • InfoParser
    • +
    • ISysmon
    • ITopicHandler
    • ITopicHandler.TopicType
    • +
    • Listener
    • LoggerH2
    • +
    • Metric
    • +
    • MetricType
    • +
    • MqttMetricType
    • +
    • MqttSysmon
    • ShutdownHook
    • SSLUtil
    • TopicHandler
    • diff --git a/docs/constant-values.html b/docs/constant-values.html index 74ce4be..61069be 100644 --- a/docs/constant-values.html +++ b/docs/constant-values.html @@ -2,9 +2,9 @@ - -Constant Field Values (OpenICE-lite 0.1.0 API) - + +Constant Field Values (OpenICE-lite 0.1.3 API) + @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ + + + + + + + + + +
      +
      edu.upenn.cis.precise.openicelite.coreapps.sysmon.api
      +

      Class ChannelInfo

      +
      +
      + +
      +
        +
      • +
        +
        +
        public class ChannelInfo
        +extends Info
        +
        A class that holds information about a channel
        +
        +
        Author:
        +
        Hyun Jung (hyju@seas.upenn.edu)
        +
        +
      • +
      +
      +
      +
        +
      • + +
          +
        • + + +

          Field Summary

          + + + + + + + + + + +
          Fields 
          Modifier and TypeField and Description
          static java.lang.String[]required 
          +
        • +
        + +
          +
        • + + +

          Constructor Summary

          + + + + + + + + +
          Constructors 
          Constructor and Description
          ChannelInfo() 
          +
        • +
        + + +
      • +
      +
      +
      +
        +
      • + +
          +
        • + + +

          Field Detail

          + + + +
            +
          • +

            required

            +
            public static final java.lang.String[] required
            +
          • +
          +
        • +
        + +
          +
        • + + +

          Constructor Detail

          + + + +
            +
          • +

            ChannelInfo

            +
            public ChannelInfo()
            +
          • +
          +
        • +
        + +
          +
        • + + +

          Method Detail

          + + + +
            +
          • +

            requiredFields

            +
            public java.lang.String[] requiredFields()
            +
            Description copied from class: Info
            +
            Returns a list of fields guaranteed to exist for this data.
            +
            +
            Overrides:
            +
            requiredFields in class Info
            +
            Returns:
            +
            String array of the names of the guaranteed fields
            +
            +
          • +
          +
        • +
        +
      • +
      +
      +
      + + + + + + + diff --git a/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/ConnectionInfo.html b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/ConnectionInfo.html new file mode 100644 index 0000000..b0f7bd2 --- /dev/null +++ b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/ConnectionInfo.html @@ -0,0 +1,332 @@ + + + + + +ConnectionInfo (OpenICE-lite 0.1.3 API) + + + + + + + + + + + + +
      +
      edu.upenn.cis.precise.openicelite.coreapps.sysmon.api
      +

      Class ConnectionInfo

      +
      +
      + +
      +
        +
      • +
        +
        +
        public class ConnectionInfo
        +extends Info
        +
        A class that holds information about a connection
        +
        +
        Author:
        +
        Hyun Jung (hyju@seas.upenn.edu)
        +
        +
      • +
      +
      +
      +
        +
      • + +
          +
        • + + +

          Field Summary

          + + + + + + + + + + +
          Fields 
          Modifier and TypeField and Description
          static java.lang.String[]required 
          +
        • +
        + +
          +
        • + + +

          Constructor Summary

          + + + + + + + + +
          Constructors 
          Constructor and Description
          ConnectionInfo() 
          +
        • +
        + + +
      • +
      +
      +
      +
        +
      • + +
          +
        • + + +

          Field Detail

          + + + +
            +
          • +

            required

            +
            public static final java.lang.String[] required
            +
          • +
          +
        • +
        + +
          +
        • + + +

          Constructor Detail

          + + + +
            +
          • +

            ConnectionInfo

            +
            public ConnectionInfo()
            +
          • +
          +
        • +
        + +
          +
        • + + +

          Method Detail

          + + + +
            +
          • +

            requiredFields

            +
            public java.lang.String[] requiredFields()
            +
            Description copied from class: Info
            +
            Returns a list of fields guaranteed to exist for this data.
            +
            +
            Overrides:
            +
            requiredFields in class Info
            +
            Returns:
            +
            String array of the names of the guaranteed fields
            +
            +
          • +
          +
        • +
        +
      • +
      +
      +
      + + + + + + + diff --git a/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/DataListener.html b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/DataListener.html new file mode 100644 index 0000000..7fe3362 --- /dev/null +++ b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/DataListener.html @@ -0,0 +1,243 @@ + + + + + +DataListener (OpenICE-lite 0.1.3 API) + + + + + + + + + + + + +
      +
      edu.upenn.cis.precise.openicelite.coreapps.sysmon.api
      +

      Interface DataListener

      +
      +
      +
      +
        +
      • +
        +
        All Superinterfaces:
        +
        Listener
        +
        +
        +
        +
        public interface DataListener
        +extends Listener
        +
        A listener interface for receiving periodic data
        +
        +
        Author:
        +
        Hyun Jung (hyju@seas.upenn.edu)
        +
        +
      • +
      +
      +
      + +
      +
      +
        +
      • + +
          +
        • + + +

          Method Detail

          + + + +
            +
          • +

            handleData

            +
            void handleData(java.util.List<Info> data)
            +
            Called when the requested metrics are received.
            +
            +
            Parameters:
            +
            data - Metrics received
            +
            +
          • +
          +
        • +
        +
      • +
      +
      +
      + + + + + + + diff --git a/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/EventListener.html b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/EventListener.html new file mode 100644 index 0000000..378a8c6 --- /dev/null +++ b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/EventListener.html @@ -0,0 +1,265 @@ + + + + + +EventListener (OpenICE-lite 0.1.3 API) + + + + + + + + + + + + +
      +
      edu.upenn.cis.precise.openicelite.coreapps.sysmon.api
      +

      Interface EventListener

      +
      +
      +
      +
        +
      • +
        +
        All Superinterfaces:
        +
        Listener
        +
        +
        +
        +
        public interface EventListener
        +extends Listener
        +
        A listener interface for receiving particular states or changes in data.
        +
        +
        Author:
        +
        Hyun Jung (hyju@seas.upenn.edu)
        +
        +
      • +
      +
      +
      +
        +
      • + +
          +
        • + + +

          Method Summary

          + + + + + + + + + + + + + + +
          All Methods Instance Methods Abstract Methods 
          Modifier and TypeMethod and Description
          booleanapply(java.util.List<Info> data) +
          Specifies the condition to be notified with the metric.
          +
          voidonConditionMet(java.util.List<Info> data) +
          Called when apply() returns true.
          +
          + +
        • +
        +
      • +
      +
      +
      +
        +
      • + +
          +
        • + + +

          Method Detail

          + + + +
            +
          • +

            apply

            +
            boolean apply(java.util.List<Info> data)
            +
            Specifies the condition to be notified with the metric. onConditionMet() will be called when this function returns true.
            +
            +
            Parameters:
            +
            data - List of metrics to apply the condition onto
            +
            Returns:
            +
            Whether to notify the caller or not
            +
            +
          • +
          + + + +
            +
          • +

            onConditionMet

            +
            void onConditionMet(java.util.List<Info> data)
            +
            Called when apply() returns true.
            +
            +
            Parameters:
            +
            data - Data that satisfied the condition stated by apply()
            +
            +
          • +
          +
        • +
        +
      • +
      +
      +
      + + + + + + + diff --git a/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/ISysmon.html b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/ISysmon.html new file mode 100644 index 0000000..ce742f8 --- /dev/null +++ b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/ISysmon.html @@ -0,0 +1,355 @@ + + + + + +ISysmon (OpenICE-lite 0.1.3 API) + + + + + + + + + + + + +
      +
      edu.upenn.cis.precise.openicelite.coreapps.sysmon.api
      +

      Interface ISysmon

      +
      +
      +
      +
        +
      • +
        +
        All Known Implementing Classes:
        +
        MqttSysmon
        +
        +
        +
        +
        public interface ISysmon
        +
        Interface to monitor system metrics
        +
        +
        Author:
        +
        Hyun Jung (hyju@seas.upenn.edu)
        +
        +
      • +
      +
      +
      +
        +
      • + +
          +
        • + + +

          Method Summary

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          All Methods Instance Methods Abstract Methods 
          Modifier and TypeMethod and Description
          voidaddListener(Metric metric, + Listener listener) +
          Attaches a listener to the specified metric.
          +
          voidaddListener(java.lang.String metric, + Listener listener) +
          Attaches a listener to the specified metric.
          +
          voidaddMonitor(Metric metric) +
          Adds the given metric to the list of metrics to request on the next interval.
          +
          voidaddMonitor(java.lang.String metric) +
          Adds the given metric to the list of metrics to request on the next interval.
          +
          voidinit(java.util.Properties properties) +
          Initializes the system monitor with given options (properties).
          +
          voidstart() +
          Start receiving system metrics periodically.
          +
          voidstop() +
          Stops receiving system metrics.
          +
          +
        • +
        +
      • +
      +
      +
      +
        +
      • + +
          +
        • + + +

          Method Detail

          + + + +
            +
          • +

            init

            +
            void init(java.util.Properties properties)
            +
            Initializes the system monitor with given options (properties).
            +
            +
            Parameters:
            +
            properties - Parsed object of the properties file
            +
            +
          • +
          + + + +
            +
          • +

            start

            +
            void start()
            +
            Start receiving system metrics periodically.
            +
          • +
          + + + +
            +
          • +

            stop

            +
            void stop()
            +
            Stops receiving system metrics.
            +
          • +
          + + + +
            +
          • +

            addMonitor

            +
            void addMonitor(java.lang.String metric)
            +
            Adds the given metric to the list of metrics to request on the next interval.
            +
            +
            Parameters:
            +
            metric - Name of the metric to request
            +
            +
          • +
          + + + +
            +
          • +

            addMonitor

            +
            void addMonitor(Metric metric)
            +
            Adds the given metric to the list of metrics to request on the next interval.
            +
            +
            Parameters:
            +
            metric - Enum of the metric to request
            +
            +
          • +
          + + + +
            +
          • +

            addListener

            +
            void addListener(java.lang.String metric,
            +                 Listener listener)
            +
            Attaches a listener to the specified metric. Starts monitoring the metric if + the monitor doesn't already
            +
            +
            Parameters:
            +
            metric - Name of the metric to attach the listener to
            +
            listener - The listener to be added
            +
            +
          • +
          + + + +
            +
          • +

            addListener

            +
            void addListener(Metric metric,
            +                 Listener listener)
            +
            Attaches a listener to the specified metric. Starts monitoring the metric if + the monitor doesn't already
            +
            +
            Parameters:
            +
            metric - Enum of the metric to attach the listener to
            +
            listener - The listener to be added
            +
            +
          • +
          +
        • +
        +
      • +
      +
      +
      + + + + + + + diff --git a/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/Info.html b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/Info.html new file mode 100644 index 0000000..6a488ed --- /dev/null +++ b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/Info.html @@ -0,0 +1,416 @@ + + + + + +Info (OpenICE-lite 0.1.3 API) + + + + + + + + + + + + +
      +
      edu.upenn.cis.precise.openicelite.coreapps.sysmon.api
      +

      Class Info

      +
      +
      +
        +
      • java.lang.Object
      • +
      • +
          +
        • edu.upenn.cis.precise.openicelite.coreapps.sysmon.api.Info
        • +
        +
      • +
      +
      +
        +
      • +
        +
        Direct Known Subclasses:
        +
        ChannelInfo, ConnectionInfo
        +
        +
        +
        +
        public class Info
        +extends java.lang.Object
        +
        A class the represents data from the system monitor
        +
        +
        Author:
        +
        Hyun Jung (hyju@seas.upenn.edu)
        +
        +
      • +
      +
      +
      +
        +
      • + +
          +
        • + + +

          Constructor Summary

          + + + + + + + + +
          Constructors 
          Constructor and Description
          Info() 
          +
        • +
        + +
          +
        • + + +

          Method Summary

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          All Methods Instance Methods Concrete Methods 
          Modifier and TypeMethod and Description
          voidadd(java.lang.String field, + java.lang.Object value) +
          Adds a field and a value to the instance.
          +
          booleancontainsField(java.lang.String field) +
          Returns whether this Info contains the specified field.
          +
          doublegetAsDouble(java.lang.String field) +
          Returns the value of the field given as a double, or 0 if the field doesn't exist.
          +
          longgetAsLong(java.lang.String field) +
          Returns the value of the field given as a long, or 0 if the field doesn't exist.
          +
          java.lang.StringgetAsString(java.lang.String field) +
          Returns the value of the field given as a String, or an empty string if the field doesn't exist.
          +
          java.util.Map<java.lang.String,java.lang.Object>getMap() +
          Returns all data in this Info as a map.
          +
          java.lang.String[]requiredFields() +
          Returns a list of fields guaranteed to exist for this data.
          +
          +
            +
          • + + +

            Methods inherited from class java.lang.Object

            +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
          • +
          +
        • +
        +
      • +
      +
      +
      +
        +
      • + +
          +
        • + + +

          Constructor Detail

          + + + +
            +
          • +

            Info

            +
            public Info()
            +
          • +
          +
        • +
        + +
          +
        • + + +

          Method Detail

          + + + +
            +
          • +

            requiredFields

            +
            public java.lang.String[] requiredFields()
            +
            Returns a list of fields guaranteed to exist for this data.
            +
            +
            Returns:
            +
            String array of the names of the guaranteed fields
            +
            +
          • +
          + + + +
            +
          • +

            containsField

            +
            public boolean containsField(java.lang.String field)
            +
            Returns whether this Info contains the specified field.
            +
            +
            Parameters:
            +
            field - Name of the field to look for
            +
            Returns:
            +
            True if this info contains the field; false otherwise.
            +
            +
          • +
          + + + +
            +
          • +

            add

            +
            public void add(java.lang.String field,
            +                java.lang.Object value)
            +
            Adds a field and a value to the instance. Both the field and the value cannot be null.
            +
            +
            Parameters:
            +
            field - Name of the field to add
            +
            value - Value of the field
            +
            +
          • +
          + + + +
            +
          • +

            getAsString

            +
            public java.lang.String getAsString(java.lang.String field)
            +
            Returns the value of the field given as a String, or an empty string if the field doesn't exist.
            +
            +
            Parameters:
            +
            field - Name of the field to find
            +
            Returns:
            +
            Value of the field as a string, or null if the field doesn't exist
            +
            +
          • +
          + + + +
            +
          • +

            getAsLong

            +
            public long getAsLong(java.lang.String field)
            +
            Returns the value of the field given as a long, or 0 if the field doesn't exist.
            +
            +
            Parameters:
            +
            field - Name of the field to find
            +
            Returns:
            +
            value of the field as a Long, or null if the field doesn't exist
            +
            +
          • +
          + + + +
            +
          • +

            getAsDouble

            +
            public double getAsDouble(java.lang.String field)
            +
            Returns the value of the field given as a double, or 0 if the field doesn't exist.
            +
            +
            Parameters:
            +
            field - Name of the field to find
            +
            Returns:
            +
            value of the field as a double, or null if the field doesn't exist
            +
            +
          • +
          + + + +
            +
          • +

            getMap

            +
            public java.util.Map<java.lang.String,java.lang.Object> getMap()
            +
            Returns all data in this Info as a map.
            +
            +
            Returns:
            +
            Map representation of all data
            +
            +
          • +
          +
        • +
        +
      • +
      +
      +
      + + + + + + + diff --git a/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/Listener.html b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/Listener.html new file mode 100644 index 0000000..129c94a --- /dev/null +++ b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/Listener.html @@ -0,0 +1,231 @@ + + + + + +Listener (OpenICE-lite 0.1.3 API) + + + + + + + + + + + + +
      +
      edu.upenn.cis.precise.openicelite.coreapps.sysmon.api
      +

      Interface Listener

      +
      +
      +
      +
        +
      • +
        +
        All Known Subinterfaces:
        +
        DataListener, EventListener
        +
        +
        +
        +
        public interface Listener
        +
        A listener interface for receiving data from the system monitor.
        +
        +
        Author:
        +
        Hyun Jung (hyju@seas.upenn.edu)
        +
        +
      • +
      +
      +
      + +
      +
      +
        +
      • + +
          +
        • + + +

          Method Detail

          + + + +
            +
          • +

            onNotAvailable

            +
            void onNotAvailable()
            +
            Called when no data is available for the requested metric.
            +
          • +
          +
        • +
        +
      • +
      +
      +
      + + + + + + + diff --git a/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/Metric.html b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/Metric.html new file mode 100644 index 0000000..b62fd8e --- /dev/null +++ b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/Metric.html @@ -0,0 +1,174 @@ + + + + + +Metric (OpenICE-lite 0.1.3 API) + + + + + + + + + + + + +
      +
      edu.upenn.cis.precise.openicelite.coreapps.sysmon.api
      +

      Interface Metric

      +
      +
      +
      +
        +
      • +
        +
        All Known Implementing Classes:
        +
        MetricType, MqttMetricType
        +
        +
        +
        +
        public interface Metric
        +
        An empty interface that all metric enums are required to implement.
        +
        +
        Author:
        +
        Hyun Jung (hyju@seas.upenn.edu)
        +
        +
      • +
      +
      +
      + + + + + + + diff --git a/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/MetricType.html b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/MetricType.html new file mode 100644 index 0000000..d3ffd63 --- /dev/null +++ b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/MetricType.html @@ -0,0 +1,345 @@ + + + + + +MetricType (OpenICE-lite 0.1.3 API) + + + + + + + + + + + + +
      +
      edu.upenn.cis.precise.openicelite.coreapps.sysmon.api
      +

      Enum MetricType

      +
      +
      +
        +
      • java.lang.Object
      • +
      • +
          +
        • java.lang.Enum<MetricType>
        • +
        • +
            +
          • edu.upenn.cis.precise.openicelite.coreapps.sysmon.api.MetricType
          • +
          +
        • +
        +
      • +
      +
      +
        +
      • +
        +
        All Implemented Interfaces:
        +
        Metric, java.io.Serializable, java.lang.Comparable<MetricType>
        +
        +
        +
        +
        public enum MetricType
        +extends java.lang.Enum<MetricType>
        +implements Metric
        +
        An Enum class specifying the metrics that all implementation of sysmon API are required to supply.
        +
        +
        Author:
        +
        Hyun Jung (hyju@seas.upenn.edu)
        +
        +
      • +
      +
      +
      +
        +
      • + +
          +
        • + + +

          Enum Constant Summary

          + + + + + + + + + + + +
          Enum Constants 
          Enum Constant and Description
          CHANNELS 
          CONNECTIONS 
          +
        • +
        + +
          +
        • + + +

          Method Summary

          + + + + + + + + + + + + + + +
          All Methods Static Methods Concrete Methods 
          Modifier and TypeMethod and Description
          static MetricTypevalueOf(java.lang.String name) +
          Returns the enum constant of this type with the specified name.
          +
          static MetricType[]values() +
          Returns an array containing the constants of this enum type, in +the order they are declared.
          +
          +
            +
          • + + +

            Methods inherited from class java.lang.Enum

            +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
          • +
          +
            +
          • + + +

            Methods inherited from class java.lang.Object

            +getClass, notify, notifyAll, wait, wait, wait
          • +
          +
        • +
        +
      • +
      +
      +
      +
        +
      • + +
          +
        • + + +

          Enum Constant Detail

          + + + +
            +
          • +

            CONNECTIONS

            +
            public static final MetricType CONNECTIONS
            +
          • +
          + + + +
            +
          • +

            CHANNELS

            +
            public static final MetricType CHANNELS
            +
          • +
          +
        • +
        + +
          +
        • + + +

          Method Detail

          + + + +
            +
          • +

            values

            +
            public static MetricType[] values()
            +
            Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
            +for (MetricType c : MetricType.values())
            +    System.out.println(c);
            +
            +
            +
            Returns:
            +
            an array containing the constants of this enum type, in the order they are declared
            +
            +
          • +
          + + + +
            +
          • +

            valueOf

            +
            public static MetricType valueOf(java.lang.String name)
            +
            Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
            +
            +
            Parameters:
            +
            name - the name of the enum constant to be returned.
            +
            Returns:
            +
            the enum constant with the specified name
            +
            Throws:
            +
            java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
            +
            java.lang.NullPointerException - if the argument is null
            +
            +
          • +
          +
        • +
        +
      • +
      +
      +
      + + + + + + + diff --git a/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/package-frame.html b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/package-frame.html new file mode 100644 index 0000000..d19d74b --- /dev/null +++ b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/package-frame.html @@ -0,0 +1,34 @@ + + + + + +edu.upenn.cis.precise.openicelite.coreapps.sysmon.api (OpenICE-lite 0.1.3 API) + + + + + +

      edu.upenn.cis.precise.openicelite.coreapps.sysmon.api

      +
      +

      Interfaces

      + +

      Classes

      + +

      Enums

      + +
      + + diff --git a/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/package-summary.html b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/package-summary.html new file mode 100644 index 0000000..1563488 --- /dev/null +++ b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/package-summary.html @@ -0,0 +1,212 @@ + + + + + +edu.upenn.cis.precise.openicelite.coreapps.sysmon.api (OpenICE-lite 0.1.3 API) + + + + + + + + + + + +
      +

      Package edu.upenn.cis.precise.openicelite.coreapps.sysmon.api

      +
      +
      +
        +
      • + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Interface Summary 
        InterfaceDescription
        DataListener +
        A listener interface for receiving periodic data
        +
        EventListener +
        A listener interface for receiving particular states or changes in data.
        +
        ISysmon +
        Interface to monitor system metrics
        +
        Listener +
        A listener interface for receiving data from the system monitor.
        +
        Metric +
        An empty interface that all metric enums are required to implement.
        +
        +
      • +
      • + + + + + + + + + + + + + + + + + + + + +
        Class Summary 
        ClassDescription
        ChannelInfo +
        A class that holds information about a channel
        +
        ConnectionInfo +
        A class that holds information about a connection
        +
        Info +
        A class the represents data from the system monitor
        +
        +
      • +
      • + + + + + + + + + + + + +
        Enum Summary 
        EnumDescription
        MetricType +
        An Enum class specifying the metrics that all implementation of sysmon API are required to supply.
        +
        +
      • +
      +
      + + + + + + diff --git a/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/package-tree.html b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/package-tree.html new file mode 100644 index 0000000..1220953 --- /dev/null +++ b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/api/package-tree.html @@ -0,0 +1,163 @@ + + + + + +edu.upenn.cis.precise.openicelite.coreapps.sysmon.api Class Hierarchy (OpenICE-lite 0.1.3 API) + + + + + + + + + + + +
      +

      Hierarchy For Package edu.upenn.cis.precise.openicelite.coreapps.sysmon.api

      +Package Hierarchies: + +
      +
      +

      Class Hierarchy

      +
        +
      • java.lang.Object +
          +
        • edu.upenn.cis.precise.openicelite.coreapps.sysmon.api.Info +
            +
          • edu.upenn.cis.precise.openicelite.coreapps.sysmon.api.ChannelInfo
          • +
          • edu.upenn.cis.precise.openicelite.coreapps.sysmon.api.ConnectionInfo
          • +
          +
        • +
        +
      • +
      +

      Interface Hierarchy

      +
        +
      • edu.upenn.cis.precise.openicelite.coreapps.sysmon.api.ISysmon
      • +
      • edu.upenn.cis.precise.openicelite.coreapps.sysmon.api.Listener +
          +
        • edu.upenn.cis.precise.openicelite.coreapps.sysmon.api.DataListener
        • +
        • edu.upenn.cis.precise.openicelite.coreapps.sysmon.api.EventListener
        • +
        +
      • +
      • edu.upenn.cis.precise.openicelite.coreapps.sysmon.api.Metric
      • +
      +

      Enum Hierarchy

      +
        +
      • java.lang.Object +
          +
        • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable) +
            +
          • edu.upenn.cis.precise.openicelite.coreapps.sysmon.api.MetricType (implements edu.upenn.cis.precise.openicelite.coreapps.sysmon.api.Metric)
          • +
          +
        • +
        +
      • +
      +
      + + + + + + diff --git a/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/DbConn.html b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/DbConn.html new file mode 100644 index 0000000..49cee62 --- /dev/null +++ b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/DbConn.html @@ -0,0 +1,425 @@ + + + + + +DbConn (OpenICE-lite 0.1.3 API) + + + + + + + + + + + + +
      +
      edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt
      +

      Class DbConn

      +
      +
      +
        +
      • java.lang.Object
      • +
      • +
          +
        • edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt.DbConn
        • +
        +
      • +
      +
      +
        +
      • +
        +
        +
        public class DbConn
        +extends java.lang.Object
        +
      • +
      +
      +
      +
        +
      • + +
          +
        • + + +

          Constructor Summary

          + + + + + + + + + + +
          Constructors 
          ModifierConstructor and Description
          protected DbConn(java.lang.String fileName) 
          +
        • +
        + +
          +
        • + + +

          Method Summary

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          All Methods Instance Methods Concrete Methods 
          Modifier and TypeMethod and Description
          protected voidconnect() +
          Connects to the database file
          +
          protected voidcreateChannelTable() +
          Creates (if not exists) a table that can store ChannelInfo
          +
          protected voidcreateConnectionTable() +
          Creates (if not exists) a table that can store ConnectionInfo
          +
          protected voiddisconnect() +
          Disconnects from the database file.
          +
          protected voidinsertChannelInfo(ChannelInfo info) +
          Inserts the given ChannelInfo object into table
          +
          protected voidinsertChannelList(java.util.List<Info> infoList) +
          Convenience method to insert a list of ChanneInfo
          +
          protected voidinsertConnectionInfo(ConnectionInfo info) +
          Inserts the given ConnectionInfo into connections table.
          +
          protected voidinsertConnectionList(java.util.List<Info> infoList) +
          Convenience method to insert a list of ConnectionInfo
          +
          protected voidinsertList(java.lang.String m, + java.util.List<Info> infoList) +
          Convenience methods to insert a list of Info
          +
          +
            +
          • + + +

            Methods inherited from class java.lang.Object

            +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
          • +
          +
        • +
        +
      • +
      +
      +
      +
        +
      • + +
          +
        • + + +

          Constructor Detail

          + + + +
            +
          • +

            DbConn

            +
            protected DbConn(java.lang.String fileName)
            +
          • +
          +
        • +
        + +
          +
        • + + +

          Method Detail

          + + + +
            +
          • +

            connect

            +
            protected void connect()
            +
            Connects to the database file
            +
          • +
          + + + +
            +
          • +

            disconnect

            +
            protected void disconnect()
            +
            Disconnects from the database file.
            +
          • +
          + + + +
            +
          • +

            createConnectionTable

            +
            protected void createConnectionTable()
            +
            Creates (if not exists) a table that can store ConnectionInfo
            +
          • +
          + + + +
            +
          • +

            insertConnectionInfo

            +
            protected void insertConnectionInfo(ConnectionInfo info)
            +
            Inserts the given ConnectionInfo into connections table.
            +
            +
            Parameters:
            +
            info - ConnectionInfo object to insert
            +
            +
          • +
          + + + +
            +
          • +

            insertConnectionList

            +
            protected void insertConnectionList(java.util.List<Info> infoList)
            +
            Convenience method to insert a list of ConnectionInfo
            +
            +
            Parameters:
            +
            infoList - List of ConnectionInfo to insert
            +
            +
          • +
          + + + +
            +
          • +

            createChannelTable

            +
            protected void createChannelTable()
            +
            Creates (if not exists) a table that can store ChannelInfo
            +
          • +
          + + + +
            +
          • +

            insertChannelInfo

            +
            protected void insertChannelInfo(ChannelInfo info)
            +
            Inserts the given ChannelInfo object into table
            +
            +
            Parameters:
            +
            info - ChannelInfo to insert
            +
            +
          • +
          + + + +
            +
          • +

            insertChannelList

            +
            protected void insertChannelList(java.util.List<Info> infoList)
            +
            Convenience method to insert a list of ChanneInfo
            +
            +
            Parameters:
            +
            infoList - List of ChannelInfo to insert
            +
            +
          • +
          + + + +
            +
          • +

            insertList

            +
            protected void insertList(java.lang.String m,
            +                          java.util.List<Info> infoList)
            +
            Convenience methods to insert a list of Info
            +
            +
            Parameters:
            +
            m - Name of metric that the list holds
            +
            infoList - List to insert
            +
            +
          • +
          +
        • +
        +
      • +
      +
      +
      + + + + + + + diff --git a/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/InfoParser.html b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/InfoParser.html new file mode 100644 index 0000000..d3b15df --- /dev/null +++ b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/InfoParser.html @@ -0,0 +1,281 @@ + + + + + +InfoParser (OpenICE-lite 0.1.3 API) + + + + + + + + + + + + +
      +
      edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt
      +

      Class InfoParser

      +
      +
      +
        +
      • java.lang.Object
      • +
      • +
          +
        • edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt.InfoParser
        • +
        +
      • +
      +
      +
        +
      • +
        +
        +
        public class InfoParser
        +extends java.lang.Object
        +
      • +
      +
      +
      +
        +
      • + +
          +
        • + + +

          Constructor Summary

          + + + + + + + + +
          Constructors 
          Constructor and Description
          InfoParser() 
          +
        • +
        + +
          +
        • + + +

          Method Summary

          + + + + + + + + + + +
          All Methods Static Methods Concrete Methods 
          Modifier and TypeMethod and Description
          protected static java.util.List<Info>parseList(java.lang.String metric, + com.google.gson.JsonArray array) +
          Parses an array of json objects into a list of Info objects.
          +
          +
            +
          • + + +

            Methods inherited from class java.lang.Object

            +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
          • +
          +
        • +
        +
      • +
      +
      +
      +
        +
      • + +
          +
        • + + +

          Constructor Detail

          + + + +
            +
          • +

            InfoParser

            +
            public InfoParser()
            +
          • +
          +
        • +
        + +
          +
        • + + +

          Method Detail

          + + + +
            +
          • +

            parseList

            +
            protected static java.util.List<Info> parseList(java.lang.String metric,
            +                                                com.google.gson.JsonArray array)
            +
            Parses an array of json objects into a list of Info objects.
            +
            +
            Parameters:
            +
            metric - Metric to use when parsing the array
            +
            array - Json array to parse
            +
            Returns:
            +
            List of parsed Info objects
            +
            +
          • +
          +
        • +
        +
      • +
      +
      +
      + + + + + + + diff --git a/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/MqttMetricType.html b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/MqttMetricType.html new file mode 100644 index 0000000..71834c6 --- /dev/null +++ b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/MqttMetricType.html @@ -0,0 +1,295 @@ + + + + + +MqttMetricType (OpenICE-lite 0.1.3 API) + + + + + + + + + + + + +
      +
      edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt
      +

      Enum MqttMetricType

      +
      +
      +
        +
      • java.lang.Object
      • +
      • +
          +
        • java.lang.Enum<MqttMetricType>
        • +
        • +
            +
          • edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt.MqttMetricType
          • +
          +
        • +
        +
      • +
      +
      +
        +
      • +
        +
        All Implemented Interfaces:
        +
        Metric, java.io.Serializable, java.lang.Comparable<MqttMetricType>
        +
        +
        +
        +
        public enum MqttMetricType
        +extends java.lang.Enum<MqttMetricType>
        +implements Metric
        +
        Metrics provided in addition to those specified in MetricType
        +
      • +
      +
      +
      +
        +
      • + +
          +
        • + + +

          Method Summary

          + + + + + + + + + + + + + + +
          All Methods Static Methods Concrete Methods 
          Modifier and TypeMethod and Description
          static MqttMetricTypevalueOf(java.lang.String name) +
          Returns the enum constant of this type with the specified name.
          +
          static MqttMetricType[]values() +
          Returns an array containing the constants of this enum type, in +the order they are declared.
          +
          +
            +
          • + + +

            Methods inherited from class java.lang.Enum

            +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
          • +
          +
            +
          • + + +

            Methods inherited from class java.lang.Object

            +getClass, notify, notifyAll, wait, wait, wait
          • +
          +
        • +
        +
      • +
      +
      +
      +
        +
      • + +
          +
        • + + +

          Method Detail

          + + + +
            +
          • +

            values

            +
            public static MqttMetricType[] values()
            +
            Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
            +for (MqttMetricType c : MqttMetricType.values())
            +    System.out.println(c);
            +
            +
            +
            Returns:
            +
            an array containing the constants of this enum type, in the order they are declared
            +
            +
          • +
          + + + +
            +
          • +

            valueOf

            +
            public static MqttMetricType valueOf(java.lang.String name)
            +
            Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
            +
            +
            Parameters:
            +
            name - the name of the enum constant to be returned.
            +
            Returns:
            +
            the enum constant with the specified name
            +
            Throws:
            +
            java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
            +
            java.lang.NullPointerException - if the argument is null
            +
            +
          • +
          +
        • +
        +
      • +
      +
      +
      + + + + + + + diff --git a/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/MqttSysmon.html b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/MqttSysmon.html new file mode 100644 index 0000000..1bebc15 --- /dev/null +++ b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/MqttSysmon.html @@ -0,0 +1,460 @@ + + + + + +MqttSysmon (OpenICE-lite 0.1.3 API) + + + + + + + + + + + + +
      +
      edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt
      +

      Class MqttSysmon

      +
      +
      +
        +
      • java.lang.Object
      • +
      • +
          +
        • edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt.MqttSysmon
        • +
        +
      • +
      +
      +
        +
      • +
        +
        All Implemented Interfaces:
        +
        ISysmon
        +
        +
        +
        +
        public class MqttSysmon
        +extends java.lang.Object
        +implements ISysmon
        +
        MQTT implementation of the system monitor interface. This class periodically requests system metric + from the broker and deliver the data to the client.
        +
        +
        Author:
        +
        Hyun Ji Jung
        +
        +
      • +
      +
      +
      +
        +
      • + +
          +
        • + + +

          Constructor Summary

          + + + + + + + + + + + + + + +
          Constructors 
          ModifierConstructor and Description
          protected MqttSysmon() 
           MqttSysmon(java.util.Properties properties) 
          +
        • +
        + +
          +
        • + + +

          Method Summary

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          All Methods Instance Methods Concrete Methods 
          Modifier and TypeMethod and Description
          voidaddListener(Metric metric, + Listener listener) +
          Attaches a listener to the specified metric.
          +
          voidaddListener(java.lang.String metric, + Listener listener) +
          Attaches a listener to the specified metric.
          +
          voidaddMonitor(Metric metric) +
          Adds the given metric to the list of metrics to request on the next interval.
          +
          voidaddMonitor(java.lang.String metric) +
          Adds the given metric to the list of metrics to request on the next interval.
          +
          voidinit(java.util.Properties properties) +
          Initializes the system monitor with given options (properties).
          +
          protected voidsetInterval(long interval) 
          voidstart() +
          Start receiving system metrics periodically.
          +
          voidstop() +
          Stops receiving system metrics.
          +
          +
            +
          • + + +

            Methods inherited from class java.lang.Object

            +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
          • +
          +
        • +
        +
      • +
      +
      +
      +
        +
      • + +
          +
        • + + +

          Constructor Detail

          + + + +
            +
          • +

            MqttSysmon

            +
            protected MqttSysmon()
            +
          • +
          + + + +
            +
          • +

            MqttSysmon

            +
            public MqttSysmon(java.util.Properties properties)
            +
          • +
          +
        • +
        + +
          +
        • + + +

          Method Detail

          + + + +
            +
          • +

            init

            +
            public void init(java.util.Properties properties)
            +
            Description copied from interface: ISysmon
            +
            Initializes the system monitor with given options (properties).
            +
            +
            Specified by:
            +
            init in interface ISysmon
            +
            Parameters:
            +
            properties - Parsed object of the properties file
            +
            +
          • +
          + + + +
            +
          • +

            setInterval

            +
            protected void setInterval(long interval)
            +
          • +
          + + + +
            +
          • +

            start

            +
            public void start()
            +
            Description copied from interface: ISysmon
            +
            Start receiving system metrics periodically.
            +
            +
            Specified by:
            +
            start in interface ISysmon
            +
            +
          • +
          + + + +
            +
          • +

            stop

            +
            public void stop()
            +
            Description copied from interface: ISysmon
            +
            Stops receiving system metrics.
            +
            +
            Specified by:
            +
            stop in interface ISysmon
            +
            +
          • +
          + + + +
            +
          • +

            addMonitor

            +
            public void addMonitor(java.lang.String metric)
            +
            Description copied from interface: ISysmon
            +
            Adds the given metric to the list of metrics to request on the next interval.
            +
            +
            Specified by:
            +
            addMonitor in interface ISysmon
            +
            Parameters:
            +
            metric - Name of the metric to request
            +
            +
          • +
          + + + +
            +
          • +

            addMonitor

            +
            public void addMonitor(Metric metric)
            +
            Description copied from interface: ISysmon
            +
            Adds the given metric to the list of metrics to request on the next interval.
            +
            +
            Specified by:
            +
            addMonitor in interface ISysmon
            +
            Parameters:
            +
            metric - Enum of the metric to request
            +
            +
          • +
          + + + +
            +
          • +

            addListener

            +
            public void addListener(java.lang.String metric,
            +                        Listener listener)
            +
            Description copied from interface: ISysmon
            +
            Attaches a listener to the specified metric. Starts monitoring the metric if + the monitor doesn't already
            +
            +
            Specified by:
            +
            addListener in interface ISysmon
            +
            Parameters:
            +
            metric - Name of the metric to attach the listener to
            +
            listener - The listener to be added
            +
            +
          • +
          + + + +
            +
          • +

            addListener

            +
            public void addListener(Metric metric,
            +                        Listener listener)
            +
            Description copied from interface: ISysmon
            +
            Attaches a listener to the specified metric. Starts monitoring the metric if + the monitor doesn't already
            +
            +
            Specified by:
            +
            addListener in interface ISysmon
            +
            Parameters:
            +
            metric - Enum of the metric to attach the listener to
            +
            listener - The listener to be added
            +
            +
          • +
          +
        • +
        +
      • +
      +
      +
      + + + + + + + diff --git a/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/package-frame.html b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/package-frame.html new file mode 100644 index 0000000..8dce287 --- /dev/null +++ b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/package-frame.html @@ -0,0 +1,26 @@ + + + + + +edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt (OpenICE-lite 0.1.3 API) + + + + + +

      edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt

      +
      +

      Classes

      + +

      Enums

      + +
      + + diff --git a/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/package-summary.html b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/package-summary.html new file mode 100644 index 0000000..6d168b4 --- /dev/null +++ b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/package-summary.html @@ -0,0 +1,167 @@ + + + + + +edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt (OpenICE-lite 0.1.3 API) + + + + + + + + + + + +
      +

      Package edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt

      +
      +
      +
        +
      • + + + + + + + + + + + + + + + + + + + + +
        Class Summary 
        ClassDescription
        DbConn 
        InfoParser 
        MqttSysmon +
        MQTT implementation of the system monitor interface.
        +
        +
      • +
      • + + + + + + + + + + + + +
        Enum Summary 
        EnumDescription
        MqttMetricType +
        Metrics provided in addition to those specified in MetricType
        +
        +
      • +
      +
      + + + + + + diff --git a/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/package-tree.html b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/package-tree.html new file mode 100644 index 0000000..6753e1f --- /dev/null +++ b/docs/edu/upenn/cis/precise/openicelite/coreapps/sysmon/mqtt/package-tree.html @@ -0,0 +1,149 @@ + + + + + +edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt Class Hierarchy (OpenICE-lite 0.1.3 API) + + + + + + + + + + + +
      +

      Hierarchy For Package edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt

      +Package Hierarchies: + +
      +
      +

      Class Hierarchy

      +
        +
      • java.lang.Object +
          +
        • edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt.DbConn
        • +
        • edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt.InfoParser
        • +
        • edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt.MqttSysmon (implements edu.upenn.cis.precise.openicelite.coreapps.sysmon.api.ISysmon)
        • +
        +
      • +
      +

      Enum Hierarchy

      +
        +
      • java.lang.Object +
          +
        • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable) +
            +
          • edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt.MqttMetricType (implements edu.upenn.cis.precise.openicelite.coreapps.sysmon.api.Metric)
          • +
          +
        • +
        +
      • +
      +
      + + + + + + diff --git a/docs/edu/upenn/cis/precise/openicelite/iomt/api/DeviceInfo.html b/docs/edu/upenn/cis/precise/openicelite/iomt/api/DeviceInfo.html index ccd7dc3..63c1d7b 100644 --- a/docs/edu/upenn/cis/precise/openicelite/iomt/api/DeviceInfo.html +++ b/docs/edu/upenn/cis/precise/openicelite/iomt/api/DeviceInfo.html @@ -2,9 +2,9 @@ - -DeviceInfo (OpenICE-lite 0.1.0 API) - + +DeviceInfo (OpenICE-lite 0.1.3 API) + @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ diff --git a/docs/edu/upenn/cis/precise/openicelite/iomt/api/package-summary.html b/docs/edu/upenn/cis/precise/openicelite/iomt/api/package-summary.html index f6997fd..b5279c0 100644 --- a/docs/edu/upenn/cis/precise/openicelite/iomt/api/package-summary.html +++ b/docs/edu/upenn/cis/precise/openicelite/iomt/api/package-summary.html @@ -2,9 +2,9 @@ - -edu.upenn.cis.precise.openicelite.iomt.api (OpenICE-lite 0.1.0 API) - + +edu.upenn.cis.precise.openicelite.iomt.api (OpenICE-lite 0.1.3 API) + @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ diff --git a/docs/edu/upenn/cis/precise/openicelite/middleware/api/package-summary.html b/docs/edu/upenn/cis/precise/openicelite/middleware/api/package-summary.html index a8331d8..996fa72 100644 --- a/docs/edu/upenn/cis/precise/openicelite/middleware/api/package-summary.html +++ b/docs/edu/upenn/cis/precise/openicelite/middleware/api/package-summary.html @@ -2,9 +2,9 @@ - -edu.upenn.cis.precise.openicelite.middleware.api (OpenICE-lite 0.1.0 API) - + +edu.upenn.cis.precise.openicelite.middleware.api (OpenICE-lite 0.1.3 API) + @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ diff --git a/docs/edu/upenn/cis/precise/openicelite/middleware/mqtt/package-summary.html b/docs/edu/upenn/cis/precise/openicelite/middleware/mqtt/package-summary.html index 64f996b..8513d4b 100644 --- a/docs/edu/upenn/cis/precise/openicelite/middleware/mqtt/package-summary.html +++ b/docs/edu/upenn/cis/precise/openicelite/middleware/mqtt/package-summary.html @@ -2,9 +2,9 @@ - -edu.upenn.cis.precise.openicelite.middleware.mqtt (OpenICE-lite 0.1.0 API) - + +edu.upenn.cis.precise.openicelite.middleware.mqtt (OpenICE-lite 0.1.3 API) + @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ diff --git a/docs/edu/upenn/cis/precise/openicelite/middleware/mqtt/type/package-summary.html b/docs/edu/upenn/cis/precise/openicelite/middleware/mqtt/type/package-summary.html index 073d2fd..9b05456 100644 --- a/docs/edu/upenn/cis/precise/openicelite/middleware/mqtt/type/package-summary.html +++ b/docs/edu/upenn/cis/precise/openicelite/middleware/mqtt/type/package-summary.html @@ -2,9 +2,9 @@ - -edu.upenn.cis.precise.openicelite.middleware.mqtt.type (OpenICE-lite 0.1.0 API) - + +edu.upenn.cis.precise.openicelite.middleware.mqtt.type (OpenICE-lite 0.1.3 API) + @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ diff --git a/docs/edu/upenn/cis/precise/openicelite/middleware/mqtt/util/package-summary.html b/docs/edu/upenn/cis/precise/openicelite/middleware/mqtt/util/package-summary.html index 1cf9a5d..830da52 100644 --- a/docs/edu/upenn/cis/precise/openicelite/middleware/mqtt/util/package-summary.html +++ b/docs/edu/upenn/cis/precise/openicelite/middleware/mqtt/util/package-summary.html @@ -2,9 +2,9 @@ - -edu.upenn.cis.precise.openicelite.middleware.mqtt.util (OpenICE-lite 0.1.0 API) - + +edu.upenn.cis.precise.openicelite.middleware.mqtt.util (OpenICE-lite 0.1.3 API) + @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@ @@ -13,6 +13,8 @@

      Packages

        +
      • edu.upenn.cis.precise.openicelite.coreapps.sysmon.api
      • +
      • edu.upenn.cis.precise.openicelite.coreapps.sysmon.mqtt
      • edu.upenn.cis.precise.openicelite.iomt.api
      • edu.upenn.cis.precise.openicelite.middleware.api
      • edu.upenn.cis.precise.openicelite.middleware.mqtt
      • diff --git a/docs/overview-summary.html b/docs/overview-summary.html index eef498a..9cb5a15 100644 --- a/docs/overview-summary.html +++ b/docs/overview-summary.html @@ -2,9 +2,9 @@ - -Overview (OpenICE-lite 0.1.0 API) - + +Overview (OpenICE-lite 0.1.3 API) + @@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@