Kafka Integration Application (Fix Javadoc errors + review comments)

1. Refactored the application into two java projects api and app as per convention
2. Deleted the onos-app-gpb project. The proto files are consolidated in the
   incubator-protobuf project as per suggestions.
3. Some code to translate ONOS Event pojo messages to GPB format.
4. Implementation of Subscribe and Unsubscribe APIs.
5. Minor changes due to review comments from 9212 and 9053
6. Refactored the proto fileso that its a 1:1 mapping between the core type to proto message.

Change-Id: I2bcc0de96150f838ccfe9e49293fe61d94062628
diff --git a/incubator/protobuf/src/main/proto/Device.proto b/incubator/protobuf/src/main/proto/Device.proto
index ec138e0..a01790e 100644
--- a/incubator/protobuf/src/main/proto/Device.proto
+++ b/incubator/protobuf/src/main/proto/Device.proto
@@ -3,6 +3,23 @@
 
 package Device;
 
+message DeviceDescription {
+  string device_Uri = 1;
+  DeviceType type = 2;
+  string manufacturer = 3;
+  string hw_version = 4;
+  string sw_version = 5;
+  string serial_number = 6;
+  string chassis_id = 7;
+  map<string, string> annotations = 8;
+}
+
+enum MastershipRole {
+  NONE = 0;
+  MASTER = 1;
+  STANDBY = 2;
+}
+
 enum DeviceType {
   OTHER = 0;
   SWITCH = 1;
@@ -20,8 +37,9 @@
   MICROWAVE = 13;
 }
 
-message DeviceDescription {
-  string device_Uri = 1;
+// Corresponds to org.onosproject.net.Device.
+message DeviceCore {
+  string deviceId = 1;
   DeviceType type = 2;
   string manufacturer = 3;
   string hw_version = 4;
@@ -29,10 +47,4 @@
   string serial_number = 6;
   string chassis_id = 7;
   map<string, string> annotations = 8;
-}
-
-enum MastershipRole {
-  NONE = 0;
-  MASTER = 1;
-  STANDBY = 2;
-}
+} 
\ No newline at end of file
diff --git a/incubator/protobuf/src/main/proto/DeviceEvent.proto b/incubator/protobuf/src/main/proto/DeviceEvent.proto
new file mode 100644
index 0000000..9bf7a2f
--- /dev/null
+++ b/incubator/protobuf/src/main/proto/DeviceEvent.proto
@@ -0,0 +1,30 @@
+syntax = "proto3";
+option java_package = "org.onosproject.grpc.net";
+
+
+import "Device.proto";
+import "Port.proto";
+
+package DeviceEvent;
+
+// Corresponds to org.onosproject.net.device.DeviceEvent.
+message DeviceNotification {
+    Device.DeviceCore device = 1;
+    DeviceEventType deviceEventType = 2;
+    Port.PortCore port = 3;
+}
+
+enum DeviceEventType {
+    DEVICE_ADDED = 0;
+    DEVICE_UPDATED = 1;
+    DEVICE_REMOVED = 2;
+    DEVICE_SUSPENDED = 3;
+    DEVICE_AVAILABILITY_CHANGED = 4;
+    PORT_ADDED = 5;
+    PORT_UPDATED = 6;
+    PORT_REMOVED = 7;
+    PORT_STATS_UPDATED = 8;
+}
+
+
+
diff --git a/incubator/protobuf/src/main/proto/Link.proto b/incubator/protobuf/src/main/proto/Link.proto
index 45b9e90..b5fcbfc 100644
--- a/incubator/protobuf/src/main/proto/Link.proto
+++ b/incubator/protobuf/src/main/proto/Link.proto
@@ -38,6 +38,20 @@
   string port_number = 2;
 }
 
+enum LinkState {
+    ACTIVE = 0;
+    INACTIVE = 1;
+}
+
+// Corresponds to org.onosproject.net.Link.
+message LinkCore {
+  LinkState state = 1;
+  ConnectPoint src = 2;
+  ConnectPoint dst = 3;
+  LinkType type = 4;
+  map<string, string> annotations = 5;
+}
+
 message LinkDescription {
   ConnectPoint src = 1;
   ConnectPoint dst = 2;
diff --git a/incubator/protobuf/src/main/proto/LinkEvent.proto b/incubator/protobuf/src/main/proto/LinkEvent.proto
new file mode 100644
index 0000000..fdd6580
--- /dev/null
+++ b/incubator/protobuf/src/main/proto/LinkEvent.proto
@@ -0,0 +1,19 @@
+syntax = "proto3";
+option java_package = "org.onosproject.grpc.net";
+
+package LinkEvent;
+
+import "Link.proto";
+
+// Corresponds to org.onosproject.net.link.LinkEvent.
+message LinkNotification {
+    LinkEventType linkEventType = 2;
+    Link.LinkCore link = 3;
+}
+
+// Link Event Types
+enum LinkEventType {
+    LINK_ADDED = 0;
+    LINK_UPDATED = 1;
+    LINK_REMOVED = 2;
+}
diff --git a/incubator/protobuf/src/main/proto/Port.proto b/incubator/protobuf/src/main/proto/Port.proto
index 0d9ed2e..a3fd34d 100644
--- a/incubator/protobuf/src/main/proto/Port.proto
+++ b/incubator/protobuf/src/main/proto/Port.proto
@@ -31,6 +31,15 @@
   map<string, string> annotations = 8;
 }
 
+// Corresponds to org.onosproject.net.Port.
+message PortCore {
+  string port_number = 1;
+  bool is_enabled = 2;
+  PortType type = 3;
+  int64 port_speed = 4;
+  map<string, string> annotations = 5;
+}
+
 message PortStatistics {
   int32 port = 1;
   int64 packets_received = 2;