svn commit: r18477 - in /dev/incubator/edgent/1.1.0-incubating: ./ rc1/ rc1/binaries/

2017-02-26 Thread dlaboss
Author: dlaboss
Date: Mon Feb 27 00:47:44 2017
New Revision: 18477

Log:
Add Apache Edgent 1.1.0-incubating/rc1

Added:
dev/incubator/edgent/1.1.0-incubating/
dev/incubator/edgent/1.1.0-incubating/rc1/
dev/incubator/edgent/1.1.0-incubating/rc1/LICENSE
dev/incubator/edgent/1.1.0-incubating/rc1/README
dev/incubator/edgent/1.1.0-incubating/rc1/RELEASE_NOTES

dev/incubator/edgent/1.1.0-incubating/rc1/apache-edgent-1.1.0-incubating-src.tgz
   (with props)

dev/incubator/edgent/1.1.0-incubating/rc1/apache-edgent-1.1.0-incubating-src.tgz.asc

dev/incubator/edgent/1.1.0-incubating/rc1/apache-edgent-1.1.0-incubating-src.tgz.md5

dev/incubator/edgent/1.1.0-incubating/rc1/apache-edgent-1.1.0-incubating-src.tgz.sha
dev/incubator/edgent/1.1.0-incubating/rc1/binaries/
dev/incubator/edgent/1.1.0-incubating/rc1/binaries/LICENSE

dev/incubator/edgent/1.1.0-incubating/rc1/binaries/apache-edgent-1.1.0-incubating-bin.tgz
   (with props)

dev/incubator/edgent/1.1.0-incubating/rc1/binaries/apache-edgent-1.1.0-incubating-bin.tgz.asc

dev/incubator/edgent/1.1.0-incubating/rc1/binaries/apache-edgent-1.1.0-incubating-bin.tgz.md5

dev/incubator/edgent/1.1.0-incubating/rc1/binaries/apache-edgent-1.1.0-incubating-bin.tgz.sha

Added: dev/incubator/edgent/1.1.0-incubating/rc1/LICENSE
==
--- dev/incubator/edgent/1.1.0-incubating/rc1/LICENSE (added)
+++ dev/incubator/edgent/1.1.0-incubating/rc1/LICENSE Mon Feb 27 00:47:44 2017
@@ -0,0 +1,229 @@
+ Apache License
+   Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+  "License" shall mean the terms and conditions for use, reproduction,
+  and distribution as defined by Sections 1 through 9 of this document.
+
+  "Licensor" shall mean the copyright owner or entity authorized by
+  the copyright owner that is granting the License.
+
+  "Legal Entity" shall mean the union of the acting entity and all
+  other entities that control, are controlled by, or are under common
+  control with that entity. For the purposes of this definition,
+  "control" means (i) the power, direct or indirect, to cause the
+  direction or management of such entity, whether by contract or
+  otherwise, or (ii) ownership of fifty percent (50%) or more of the
+  outstanding shares, or (iii) beneficial ownership of such entity.
+
+  "You" (or "Your") shall mean an individual or Legal Entity
+  exercising permissions granted by this License.
+
+  "Source" form shall mean the preferred form for making modifications,
+  including but not limited to software source code, documentation
+  source, and configuration files.
+
+  "Object" form shall mean any form resulting from mechanical
+  transformation or translation of a Source form, including but
+  not limited to compiled object code, generated documentation,
+  and conversions to other media types.
+
+  "Work" shall mean the work of authorship, whether in Source or
+  Object form, made available under the License, as indicated by a
+  copyright notice that is included in or attached to the work
+  (an example is provided in the Appendix below).
+
+  "Derivative Works" shall mean any work, whether in Source or Object
+  form, that is based on (or derived from) the Work and for which the
+  editorial revisions, annotations, elaborations, or other modifications
+  represent, as a whole, an original work of authorship. For the purposes
+  of this License, Derivative Works shall not include works that remain
+  separable from, or merely link (or bind by name) to the interfaces of,
+  the Work and Derivative Works thereof.
+
+  "Contribution" shall mean any work of authorship, including
+  the original version of the Work and any modifications or additions
+  to that Work or Derivative Works thereof, that is intentionally
+  submitted to Licensor for inclusion in the Work by the copyright owner
+  or by an individual or Legal Entity authorized to submit on behalf of
+  the copyright owner. For the purposes of this definition, "submitted"
+  means any form of electronic, verbal, or written communication sent
+  to the Licensor or its representatives, including but not limited to
+  communication on electronic mailing lists, source code control systems,
+  and issue tracking systems that are managed by, or on behalf of, the
+  Licensor for the purpose of discussing and improving the Work, but
+  excluding communication that is conspicuously marked or otherwise
+  designated in writing by the copyright owner as "Not a Contribution."
+
+  "Contributor" shall mean Licensor and any individual or

[incubator-edgent] Git Push Summary

2017-02-26 Thread dlaboss
Repository: incubator-edgent
Updated Tags:  refs/tags/1.1.0-incubating-RC1 [created] af960504a


[incubator-edgent] Git Push Summary

2017-02-26 Thread dlaboss
Repository: incubator-edgent
Updated Branches:
  refs/heads/release-1.1.0 [created] 4744f56bb


[03/13] incubator-edgent git commit: clarify limitations with IotProvider and PublishSubscribeService

2017-02-26 Thread dlaboss
clarify limitations with IotProvider and PublishSubscribeService

Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/f31b98cf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/f31b98cf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/f31b98cf

Branch: refs/heads/master
Commit: f31b98cf4dbe3d1571552c6fdcb154130ac8f04b
Parents: 5926814
Author: Dale LaBossiere 
Authored: Fri Feb 24 19:24:10 2017 -0500
Committer: Dale LaBossiere 
Committed: Fri Feb 24 21:53:41 2017 -0500

--
 .../apache/edgent/apps/iot/PubSubIotDevice.java | 18 +
 .../edgent/connectors/iotp/IotpGateway.java | 10 ++
 .../iotp/runtime/IotpGWConnector.java   |  1 +
 .../samples/connectors/iotp/IotpAppClient.java  | 21 ++--
 4 files changed, 40 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/f31b98cf/apps/iot/src/main/java/org/apache/edgent/apps/iot/PubSubIotDevice.java
--
diff --git 
a/apps/iot/src/main/java/org/apache/edgent/apps/iot/PubSubIotDevice.java 
b/apps/iot/src/main/java/org/apache/edgent/apps/iot/PubSubIotDevice.java
index e6a64b3..c45a71a 100644
--- a/apps/iot/src/main/java/org/apache/edgent/apps/iot/PubSubIotDevice.java
+++ b/apps/iot/src/main/java/org/apache/edgent/apps/iot/PubSubIotDevice.java
@@ -121,16 +121,26 @@ class PubSubIotDevice implements IotDevice {
 return commandsStream;
 }
 
+/**
+ * {@inheritDoc}
+ * 
+ * Not yet implemented.  
+ * Returns a canned string instead of the backing IotDevice's info. 
+ */
 @Override
 public String getDeviceType() {
-  // TODO Auto-generated method stub
-  return null;
+  return "NYI_PubSubIotDevice_DEVICE_TYPE";
 }
 
+/**
+ * {@inheritDoc}
+ * 
+ * Not yet implemented.  
+ * Returns a canned string instead of the backing IotDevice's info. 
+ */
 @Override
 public String getDeviceId() {
-  // TODO Auto-generated method stub
-  return null;
+  return "NYI_PubSubIotDevice_DEVICE_ID";
 }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/f31b98cf/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGateway.java
--
diff --git 
a/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGateway.java
 
b/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGateway.java
index b2137f2..7a2b293 100644
--- 
a/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGateway.java
+++ 
b/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGateway.java
@@ -16,6 +16,7 @@ import 
org.apache.edgent.connectors.iotp.runtime.IotpGWDeviceEventsFixed;
 import org.apache.edgent.connectors.iotp.runtime.IotpGWDeviceEventsFunction;
 import org.apache.edgent.connectors.iotp.runtime.IotpGWEventsFixed;
 import org.apache.edgent.connectors.iotp.runtime.IotpGWEventsFunction;
+import org.apache.edgent.connectors.pubsub.service.PublishSubscribeService;
 import org.apache.edgent.function.Function;
 import org.apache.edgent.function.UnaryOperator;
 import org.apache.edgent.topology.TSink;
@@ -40,6 +41,15 @@ import com.ibm.iotf.client.gateway.GatewayClient;
  * An application can use 
  * {@link #setExternalCallbackHandler(GatewayCallback) 
setExternalCallbackHandler}
  * to also receive and process callbacks.
+ * 
+ * Limitations:
+ * 
+ * {@link IotProvider} and {@link PublishSubscribeService} do not yet 
support
+ * the gateway model.  An IotProvider may be initialized with an IotpGateway
+ * but the PublishSubscribeService mechanism will only publish events and 
receive
+ * commands for the gateway device, not any of its connected devices.
+ * 
+ * 
  */
 public class IotpGateway implements IotGateway {
 

http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/f31b98cf/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/runtime/IotpGWConnector.java
--
diff --git 
a/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/runtime/IotpGWConnector.java
 
b/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/runtime/IotpGWConnector.java
index 84e7631..8ae5f84 100644
--- 
a/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/runtime/IotpGWConnector.java
+++ 
b/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/runtime/IotpGWConnector.java
@@ -207,6 +207,7 @@ public class IotpGWConnector implements Serializable, 
AutoCloseable {
 }
 }
 
+// See https://github.com/ibm-watson-iot/iot-java/issues/83
 //void pub

[07/13] incubator-edgent git commit: flesh out new methods in EchoIotDevice and MqttDevice

2017-02-26 Thread dlaboss
flesh out new methods in EchoIotDevice and MqttDevice

Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/5926814c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/5926814c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/5926814c

Branch: refs/heads/master
Commit: 5926814c28a754fed90b9bac94073b2f05d7f695
Parents: 47becd2
Author: Dale LaBossiere 
Authored: Fri Feb 24 08:23:15 2017 -0500
Committer: Dale LaBossiere 
Committed: Fri Feb 24 21:53:41 2017 -0500

--
 .../apache/edgent/test/apps/iot/EchoIotDevice.java| 10 ++
 .../apache/edgent/connectors/mqtt/iot/MqttDevice.java | 14 ++
 2 files changed, 16 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/5926814c/apps/iot/src/test/java/org/apache/edgent/test/apps/iot/EchoIotDevice.java
--
diff --git 
a/apps/iot/src/test/java/org/apache/edgent/test/apps/iot/EchoIotDevice.java 
b/apps/iot/src/test/java/org/apache/edgent/test/apps/iot/EchoIotDevice.java
index 95d62d2..055efca 100644
--- a/apps/iot/src/test/java/org/apache/edgent/test/apps/iot/EchoIotDevice.java
+++ b/apps/iot/src/test/java/org/apache/edgent/test/apps/iot/EchoIotDevice.java
@@ -44,6 +44,9 @@ import com.google.gson.JsonObject;
 public class EchoIotDevice implements IotDevice {
 
 public static final String EVENT_CMD_ID = "cmdId";
+public static final String MY_DEVICE_TYPE = "echoDeviceType";
+public static final String MY_FQDEVICE_ID = MY_DEVICE_TYPE+"/echoDeviceId";
+public static final String EVENT_CMD_DEVICE = MY_FQDEVICE_ID;
 
 private final Topology topology;
 private TStream echoCmds;
@@ -64,6 +67,7 @@ public class EchoIotDevice implements IotDevice {
 stream = stream.map(e -> {
 JsonObject c = new JsonObject();
 JsonObject evPayload = payload.apply(e);
+c.addProperty(CMD_DEVICE, EVENT_CMD_DEVICE);
 c.addProperty(CMD_ID, getCommandIdFromEvent(eventId.apply(e), 
evPayload));
 c.add(CMD_PAYLOAD, evPayload);
 c.addProperty(CMD_FORMAT, "json");
@@ -117,14 +121,12 @@ public class EchoIotDevice implements IotDevice {
 
 @Override
 public String getDeviceType() {
-  // TODO Auto-generated method stub
-  return null;
+  return MY_DEVICE_TYPE;
 }
 
 @Override
 public String getDeviceId() {
-  // TODO Auto-generated method stub
-  return null;
+  return MY_FQDEVICE_ID;
 }
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/5926814c/connectors/mqtt/src/main/java/org/apache/edgent/connectors/mqtt/iot/MqttDevice.java
--
diff --git 
a/connectors/mqtt/src/main/java/org/apache/edgent/connectors/mqtt/iot/MqttDevice.java
 
b/connectors/mqtt/src/main/java/org/apache/edgent/connectors/mqtt/iot/MqttDevice.java
index 6df2c5b..f283607 100644
--- 
a/connectors/mqtt/src/main/java/org/apache/edgent/connectors/mqtt/iot/MqttDevice.java
+++ 
b/connectors/mqtt/src/main/java/org/apache/edgent/connectors/mqtt/iot/MqttDevice.java
@@ -242,6 +242,7 @@ public class MqttDevice implements IotDevice {
 commandStream = connector.subscribe(topicFilter, commandQoS,
 (topic, payload) -> {
 JsonObject jo = new JsonObject();
+jo.addProperty(CMD_DEVICE, deviceId);
 jo.addProperty(CMD_ID, extractCmd(topic));
 jo.addProperty(CMD_TS, System.currentTimeMillis());
 String fmt = extractCmdFmt(topic);
@@ -277,15 +278,20 @@ public class MqttDevice implements IotDevice {
 return topology;
 }
 
+/**
+ * {@inheritDoc}
+ *  
+ * This connector does not support the notion of a device-type
+ * as part of its device id model.  An empty string is returned.
+ */
 @Override
 public String getDeviceType() {
-  // TODO Auto-generated method stub
-  return null;
+  // not part of this connector's device identifier model
+  return "";
 }
 
 @Override
 public String getDeviceId() {
-  // TODO Auto-generated method stub
-  return null;
+  return deviceId;
 }
 }



[02/13] incubator-edgent git commit: [Edgent-374] [COMMENTS?] IotGateway [ci-skip]

2017-02-26 Thread dlaboss
[Edgent-374] [COMMENTS?] IotGateway [ci-skip]

Add IotGateway
Add IotDevice.{getDeviceType(),getDeviceId(),CMD_DEVICE}

These IotDevice changes break existing IotDevice implementations but in
practice this won't be a problem - its highly unlikely any IotDevice
implementations exist outside of this repository (and adapting is
trivial).  "default" can't be used due to support for Java7/Android.  

Other schemes are possible that avoid this but they don't model things
as well (an IotDevice really does have an Id), introduce even more types
(e.g., a IotGatewayConnectedDevice), and/or are less convenient to use.
e.g., those new IotDevice methods could be migrated to IotGateway -
IotGateway.getDeviceId(IotDevice).

Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/82862367
Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/82862367
Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/82862367

Branch: refs/heads/master
Commit: 82862367b238013f164c06ba7982ebf6a4492cf7
Parents: 2d94ce0
Author: Dale LaBossiere 
Authored: Wed Feb 1 15:39:48 2017 -0500
Committer: Dale LaBossiere 
Committed: Fri Feb 24 21:53:40 2017 -0500

--
 .../apache/edgent/connectors/iot/IotDevice.java |  41 ++-
 .../edgent/connectors/iot/IotGateway.java   | 122 +++
 2 files changed, 162 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/82862367/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/IotDevice.java
--
diff --git 
a/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/IotDevice.java 
b/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/IotDevice.java
index 920561d..046bc95 100644
--- 
a/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/IotDevice.java
+++ 
b/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/IotDevice.java
@@ -29,6 +29,22 @@ import com.google.gson.JsonObject;
 
 /**
  * Generic Internet of Things device connector.
+ * 
+ * IotDevice characteristics:
+ * 
+ * {@code IotDevice.getDeviceTypeId()} returns an opaque value whose form
+ *  is the domain of an IoT connector implementation.
+ * {@code IotDevice.getDeviceId()} returns an opaque value whose form
+ *  is the domain of an IoT connector implementation.
+ *  The value is unique for a particular a logical device.
+ * {@code IotDevice.equals()} returns true if two IotDevice instances are
+ * for the same logical device, false otherwise.
+ * {@code IotDevice.hashCode()} returns the same value for all IotDevice 
instances
+ * for the same logical device.
+ * {@code IotDevice} may be used as a {@link 
org.apache.edgent.topology.TWindow TWindow} partition key. 
+ * 
+ * 
+ * @see IotGateway
  */
 public interface IotDevice extends TopologyElement {
 
@@ -36,6 +52,20 @@ public interface IotDevice extends TopologyElement {
  * Device event and command identifiers starting with {@value} are 
reserved for use by Edgent.
  */
 String RESERVED_ID_PREFIX = "edgent";
+
+/**
+ * Get the device's opaque device type identifier.
+ * TODO remove the "default" - avoids compilation errors while discussing 
this.
+ * @return
+ */
+public default String getDeviceType() { return "a-device-type-id"; }
+
+/**
+ * Get the device's unique opaque device identifier.
+ * TODO remove the "default" - avoids compilation errors while discussing 
this.
+ * @return
+ */
+public default String getDeviceId() { return "a-device-id"; }
 
 /**
  * Publish a stream's tuples as device events.
@@ -106,12 +136,21 @@ public interface IotDevice extends TopologyElement {
  * @see #commands(String...)
  */
 String CMD_PAYLOAD = "payload";
+/**
+ * Device identifier key.
+ * Key is {@value}.
+ * The value is the result of {@link #getDeviceId()}.
+ * 
+ * @see #commands(String...)
+ */
+String CMD_DEVICE = "device";
 
 /**
  * Create a stream of device commands as JSON objects.
  * Each command sent to the device matching {@code commands} will result 
in a tuple
  * on the stream. The JSON object has these keys:
  * 
+ * {@link #CMD_DEVICE device} - Command's opaque target device's id 
String.
  * {@link #CMD_ID command} - Command identifier as a String
  * {@link #CMD_TS tsms} - Timestamp of the command in milliseconds 
since the 1970/1/1 epoch.
  * {@link #CMD_FORMAT format} - Format of the command as a String
@@ -125,7 +164,7 @@ public interface IotDevice extends TopologyElement {
  * 
  * 
  * @param commands Command identifiers to include. If no command 
identifiers are provided then th

[04/13] incubator-edgent git commit: fix build issue

2017-02-26 Thread dlaboss
fix build issue

Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/c1e5b84e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/c1e5b84e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/c1e5b84e

Branch: refs/heads/master
Commit: c1e5b84eab0c4e8cb054452ab4bf234bf1f52b84
Parents: f31b98c
Author: Dale LaBossiere 
Authored: Fri Feb 24 19:32:22 2017 -0500
Committer: Dale LaBossiere 
Committed: Fri Feb 24 21:53:41 2017 -0500

--
 .../main/java/org/apache/edgent/connectors/iotp/IotpGateway.java  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/c1e5b84e/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGateway.java
--
diff --git 
a/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGateway.java
 
b/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGateway.java
index 7a2b293..2e093b3 100644
--- 
a/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGateway.java
+++ 
b/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGateway.java
@@ -16,7 +16,6 @@ import 
org.apache.edgent.connectors.iotp.runtime.IotpGWDeviceEventsFixed;
 import org.apache.edgent.connectors.iotp.runtime.IotpGWDeviceEventsFunction;
 import org.apache.edgent.connectors.iotp.runtime.IotpGWEventsFixed;
 import org.apache.edgent.connectors.iotp.runtime.IotpGWEventsFunction;
-import org.apache.edgent.connectors.pubsub.service.PublishSubscribeService;
 import org.apache.edgent.function.Function;
 import org.apache.edgent.function.UnaryOperator;
 import org.apache.edgent.topology.TSink;
@@ -44,7 +43,7 @@ import com.ibm.iotf.client.gateway.GatewayClient;
  * 
  * Limitations:
  * 
- * {@link IotProvider} and {@link PublishSubscribeService} do not yet 
support
+ * {@code IotProvider} and {@code PublishSubscribeService} do not yet 
support
  * the gateway model.  An IotProvider may be initialized with an IotpGateway
  * but the PublishSubscribeService mechanism will only publish events and 
receive
  * commands for the gateway device, not any of its connected devices.



[05/13] incubator-edgent git commit: add missing license headers

2017-02-26 Thread dlaboss
add missing license headers

Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/2182c354
Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/2182c354
Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/2182c354

Branch: refs/heads/master
Commit: 2182c354aeec821affe343ed14dc3098535be0c2
Parents: c1e5b84
Author: Dale LaBossiere 
Authored: Fri Feb 24 21:09:36 2017 -0500
Committer: Dale LaBossiere 
Committed: Fri Feb 24 21:53:41 2017 -0500

--
 build.gradle |  2 +-
 .../edgent/connectors/iotp/IotpGWDevice.java | 19 +++
 .../edgent/connectors/iotp/IotpGateway.java  | 19 +++
 3 files changed, 39 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/2182c354/build.gradle
--
diff --git a/build.gradle b/build.gradle
index 5be458d..2bf8149 100644
--- a/build.gradle
+++ b/build.gradle
@@ -80,7 +80,7 @@ rat {
 'licenses/binary-release/mqttv3-1.1.0.EDL-1.0',  // OK, EDL-1.0
 'licenses/binary-release/watson-iot-0.2.2.EPL-1.0',  // OK, only binary 
form content
 'samples/**/*.properties',
-'samples/**/device.cfg',
+'samples/**/*.cfg',
 'scripts/**/*.properties',
 'scripts/**/device.cfg',
 'scripts/connectors/jdbc/persondata.txt',

http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/2182c354/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGWDevice.java
--
diff --git 
a/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGWDevice.java
 
b/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGWDevice.java
index a0bd2e3..ddd5b1d 100644
--- 
a/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGWDevice.java
+++ 
b/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGWDevice.java
@@ -1,3 +1,22 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
 package org.apache.edgent.connectors.iotp;
 
 import org.apache.edgent.connectors.iot.IotDevice;

http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/2182c354/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGateway.java
--
diff --git 
a/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGateway.java
 
b/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGateway.java
index 2e093b3..f663732 100644
--- 
a/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGateway.java
+++ 
b/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGateway.java
@@ -1,3 +1,22 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
 package org.apache.edgent.connectors.iotp;
 
 import java.io.File;



[13/13] incubator-edgent git commit: final cleanup

2017-02-26 Thread dlaboss
final cleanup

Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/4744f56b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/4744f56b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/4744f56b

Branch: refs/heads/master
Commit: 4744f56bbceb72a9c91c390f440f4af312d3dba6
Parents: 90b3646
Author: Dale LaBossiere 
Authored: Sun Feb 26 15:33:53 2017 -0500
Committer: Dale LaBossiere 
Committed: Sun Feb 26 15:33:53 2017 -0500

--
 .../org/apache/edgent/connectors/iotp/IotpGWDevice.java | 12 ++--
 scripts/connectors/iotp/README  |  4 ++--
 scripts/connectors/iotp/iotp-gwdevice-sample.cfg|  2 +-
 3 files changed, 13 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/4744f56b/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGWDevice.java
--
diff --git 
a/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGWDevice.java
 
b/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGWDevice.java
index ddd5b1d..786fd59 100644
--- 
a/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGWDevice.java
+++ 
b/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGWDevice.java
@@ -31,7 +31,15 @@ import org.apache.edgent.topology.Topology;
 
 import com.google.gson.JsonObject;
 
-class IotpGWDevice implements IotDevice {  // TODO implements IotpDevice ??? 
does GW allow for http?
+/**
+ * An IotDevice connected to WIoTP via a Gateway device.
+ * 
+ * This is a non-public part of the IotpGateway implementation.
+ * 
+ * @see IotpGateway#getIotDevice(java.util.Map)
+ * @see IotpGateway#getIotDevice(java.util.Map)
+ */
+class IotpGWDevice implements IotDevice {
   
   private final IotpGateway gateway;
   private final IotpGWConnector connector;
@@ -96,4 +104,4 @@ class IotpGWDevice implements IotDevice {  // TODO 
implements IotpDevice ??? doe
 return String.format("IotpGWDevice %s", fqDeviceId); 
   }
   
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/4744f56b/scripts/connectors/iotp/README
--
diff --git a/scripts/connectors/iotp/README b/scripts/connectors/iotp/README
index 0eaee83..eccb2f8 100644
--- a/scripts/connectors/iotp/README
+++ b/scripts/connectors/iotp/README
@@ -15,7 +15,7 @@ IotpQuickstart2 - ./runquickstart2.sh [useHttp]
 # IotpSensors connects to your IBM Watson IoT Platform service
 # as the device defined in your device config file.
 #
-# A sample config file for your WIoTP registered device information 
+# A prototype config file for your WIoTP registered device information 
 # is provided in device.cfg.
 
 IotpSensors - ./runiotsensors.sh device-cfg-path
@@ -27,7 +27,7 @@ IotpSensors - ./runiotsensors.sh device-cfg-path
 # Use IotpAppClient to print out the generated device events and
 # to generate the device commands.
 #
-# Sample config files for your WIoTP registered device, gateway,
+# Prototype config files for your WIoTP registered device, gateway,
 # and application client information are provided in
 # iotp-device-sample.cfg, iotp-gwdevice-sample.cfg and iotp-app-client.cfg
 

http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/4744f56b/scripts/connectors/iotp/iotp-gwdevice-sample.cfg
--
diff --git a/scripts/connectors/iotp/iotp-gwdevice-sample.cfg 
b/scripts/connectors/iotp/iotp-gwdevice-sample.cfg
index f1f4009..1845fcc 100644
--- a/scripts/connectors/iotp/iotp-gwdevice-sample.cfg
+++ b/scripts/connectors/iotp/iotp-gwdevice-sample.cfg
@@ -3,7 +3,7 @@
 [device]
 # WIoTP defined IoT Gateway device configuration properties
 
-Organization-ID = zr2b4z
+Organization-ID = 
 Gateway-Type = 
 Gateway-ID = 
 Authentication-Method = token



[08/13] incubator-edgent git commit: Initial IotpGateway implementation

2017-02-26 Thread dlaboss
Initial IotpGateway implementation

- some updates to the initial IotGateway interface
- add IotpGateway and its runtime classes
- add sample clients - it all seems to be working
- TODO flesh out the new IotDevice methods in EchoIotDevice, MqttDevice
and PubSubIotDevice

Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/3401fbf7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/3401fbf7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/3401fbf7

Branch: refs/heads/master
Commit: 3401fbf74e69218634add84f895a2c7c78afe628
Parents: 26c198b
Author: Dale LaBossiere 
Authored: Thu Feb 23 17:10:13 2017 -0500
Committer: Dale LaBossiere 
Committed: Fri Feb 24 21:53:41 2017 -0500

--
 .../apache/edgent/apps/iot/PubSubIotDevice.java |  12 +
 .../edgent/test/apps/iot/EchoIotDevice.java |  12 +
 .../apache/edgent/connectors/iot/IotDevice.java |   6 +-
 .../edgent/connectors/iot/IotGateway.java   |  32 +-
 .../edgent/connectors/iotp/IotpDevice.java  |  26 +-
 .../edgent/connectors/iotp/IotpGWDevice.java|  80 +
 .../edgent/connectors/iotp/IotpGateway.java | 316 +++
 .../connectors/iotp/runtime/IotpConnector.java  |  23 ++
 .../iotp/runtime/IotpDeviceCommands.java|   5 +-
 .../connectors/iotp/runtime/IotpGWCommands.java |  51 +++
 .../iotp/runtime/IotpGWConnector.java   | 263 +++
 .../iotp/runtime/IotpGWDeviceEventsFixed.java   |  48 +++
 .../runtime/IotpGWDeviceEventsFunction.java |  55 
 .../iotp/runtime/IotpGWEventsFixed.java |  46 +++
 .../iotp/runtime/IotpGWEventsFunction.java  |  53 
 .../edgent/connectors/mqtt/iot/MqttDevice.java  |  12 +
 .../samples/connectors/iotp/IotpAppClient.java  | 136 
 .../connectors/iotp/IotpDeviceSample.java   | 152 +
 .../connectors/iotp/IotpGWDeviceSample.java | 198 
 scripts/connectors/iotp/iotp-app-client.cfg |  25 ++
 scripts/connectors/iotp/iotp-device-sample.cfg  |  10 +
 .../connectors/iotp/iotp-gwdevice-sample.cfg|  17 +
 scripts/connectors/iotp/run-iotp-app-client.sh  |  45 +++
 .../connectors/iotp/run-iotp-device-sample.sh   |  43 +++
 .../connectors/iotp/run-iotp-gwdevice-sample.sh |  44 +++
 25 files changed, 1683 insertions(+), 27 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/3401fbf7/apps/iot/src/main/java/org/apache/edgent/apps/iot/PubSubIotDevice.java
--
diff --git 
a/apps/iot/src/main/java/org/apache/edgent/apps/iot/PubSubIotDevice.java 
b/apps/iot/src/main/java/org/apache/edgent/apps/iot/PubSubIotDevice.java
index 0110a01..e6a64b3 100644
--- a/apps/iot/src/main/java/org/apache/edgent/apps/iot/PubSubIotDevice.java
+++ b/apps/iot/src/main/java/org/apache/edgent/apps/iot/PubSubIotDevice.java
@@ -121,4 +121,16 @@ class PubSubIotDevice implements IotDevice {
 return commandsStream;
 }
 
+@Override
+public String getDeviceType() {
+  // TODO Auto-generated method stub
+  return null;
+}
+
+@Override
+public String getDeviceId() {
+  // TODO Auto-generated method stub
+  return null;
+}
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/3401fbf7/apps/iot/src/test/java/org/apache/edgent/test/apps/iot/EchoIotDevice.java
--
diff --git 
a/apps/iot/src/test/java/org/apache/edgent/test/apps/iot/EchoIotDevice.java 
b/apps/iot/src/test/java/org/apache/edgent/test/apps/iot/EchoIotDevice.java
index 65b217f..95d62d2 100644
--- a/apps/iot/src/test/java/org/apache/edgent/test/apps/iot/EchoIotDevice.java
+++ b/apps/iot/src/test/java/org/apache/edgent/test/apps/iot/EchoIotDevice.java
@@ -114,5 +114,17 @@ public class EchoIotDevice implements IotDevice {
 Set cmds = new HashSet<>(Arrays.asList(commands));
 return echoCmds.filter(cmd -> 
cmds.contains(cmd.getAsJsonPrimitive(CMD_ID).getAsString()));
 }
+
+@Override
+public String getDeviceType() {
+  // TODO Auto-generated method stub
+  return null;
+}
+
+@Override
+public String getDeviceId() {
+  // TODO Auto-generated method stub
+  return null;
+}
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/3401fbf7/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/IotDevice.java
--
diff --git 
a/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/IotDevice.java 
b/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/IotDevice.java
index 16d81f4..b44269d 100644
--- 
a/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/IotDevice.java
+++ 
b/conne

[12/13] incubator-edgent git commit: ignore WIoTP sample *.cfg files in RAT

2017-02-26 Thread dlaboss
ignore WIoTP sample *.cfg files in RAT

Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/90b36466
Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/90b36466
Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/90b36466

Branch: refs/heads/master
Commit: 90b36466ba7781ef333656012a11f815ad42cda9
Parents: 5647338
Author: Dale LaBossiere 
Authored: Sun Feb 26 15:07:21 2017 -0500
Committer: Dale LaBossiere 
Committed: Sun Feb 26 15:07:21 2017 -0500

--
 build.gradle | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/90b36466/build.gradle
--
diff --git a/build.gradle b/build.gradle
index 2bf8149..450a54c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -82,7 +82,7 @@ rat {
 'samples/**/*.properties',
 'samples/**/*.cfg',
 'scripts/**/*.properties',
-'scripts/**/device.cfg',
+'scripts/**/*.cfg',
 'scripts/connectors/jdbc/persondata.txt',
 'scripts/connectors/kafka/README-kafka',
 'test/**/*.properties',



[09/13] incubator-edgent git commit: fix javadoc warnings

2017-02-26 Thread dlaboss
fix javadoc warnings

Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/47becd22
Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/47becd22
Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/47becd22

Branch: refs/heads/master
Commit: 47becd22598aa08ce4dd869e28e0ebf97e4ce73b
Parents: 3401fbf
Author: Dale LaBossiere 
Authored: Thu Feb 23 17:34:57 2017 -0500
Committer: Dale LaBossiere 
Committed: Fri Feb 24 21:53:41 2017 -0500

--
 .../org/apache/edgent/connectors/iot/IotGateway.java  |  2 +-
 .../org/apache/edgent/connectors/iotp/IotpDevice.java | 10 ++
 .../apache/edgent/connectors/iotp/IotpGateway.java| 14 --
 3 files changed, 15 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/47becd22/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/IotGateway.java
--
diff --git 
a/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/IotGateway.java 
b/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/IotGateway.java
index abaaf8a..9a62f25 100644
--- 
a/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/IotGateway.java
+++ 
b/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/IotGateway.java
@@ -49,7 +49,7 @@ import com.google.gson.JsonObject;
  * 
  * Events can be published that are from a connected device's deviceId and 
commands can be 
  * received for that are targeted for it using
- * {@link #eventsForDevice(String, TStream, String, JsonObject, int) 
eventsForDevice()}
+ * {@link #eventsForDevice(String, TStream, String, int) eventsForDevice()}
  * and {@link #commandsForDevice(Set, String...) commandsForDevice()}. 
  * 
  * @see Edgent 
generic IoT device model

http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/47becd22/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpDevice.java
--
diff --git 
a/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpDevice.java
 
b/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpDevice.java
index 0ea5f06..caab29a 100644
--- 
a/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpDevice.java
+++ 
b/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpDevice.java
@@ -125,12 +125,13 @@ public class IotpDevice implements IotDevice {
  * Connecting to the server occurs when the topology is submitted for
  * execution.
  * 
+ * 
+ * See the IBM Watson IoT Platform documentation for additional properties.
+ * 
  *
  * @param options control options
  * @param topology
  *the connector's associated {@code Topology}.
- *
- * @see the IBM Watson IoT Platform documentation for additional 
properties.
  */
 public IotpDevice(Topology topology, Properties options) {
 this.topology = topology;
@@ -166,10 +167,11 @@ public class IotpDevice implements IotDevice {
  * Connecting to the server occurs when the topology is submitted for
  * execution.
  * 
+ * 
+ * See the IBM Watson IoT Platform documentation for additional properties.
+ * 
  * @param topology the connector's associated {@code Topology}.
  * @param optionsFile File containing connection information.
- * 
- * @see the IBM Watson IoT Platform documentation for additional 
properties.
  */
 public IotpDevice(Topology topology, File optionsFile) {
 this.topology = topology;

http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/47becd22/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGateway.java
--
diff --git 
a/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGateway.java
 
b/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGateway.java
index aee3d71..b2137f2 100644
--- 
a/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGateway.java
+++ 
b/connectors/iotp/src/main/java/org/apache/edgent/connectors/iotp/IotpGateway.java
@@ -76,12 +76,13 @@ public class IotpGateway implements IotGateway {
* Connecting to the server occurs when the topology is submitted for
* execution.
* 
+   * 
+   * See the IBM Watson IoT Platform documentation for additional properties.
+   * 
*
* @param options control options
* @param topology
*the connector's associated {@code Topology}.
-   *
-   * @see the IBM Watson IoT Platform documentation for additional properties.
*/
   public IotpGateway(Topology topo

[06/13] incubator-edgent git commit: updates / cleanup

2017-02-26 Thread dlaboss
updates / cleanup

- add the ability to avoid use of IotDevice from a gateway context

Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/26c198b6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/26c198b6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/26c198b6

Branch: refs/heads/master
Commit: 26c198b615eb887acbd0549e8d032469330e3ce4
Parents: 48bbb10
Author: Dale LaBossiere 
Authored: Fri Feb 3 16:16:34 2017 -0500
Committer: Dale LaBossiere 
Committed: Fri Feb 24 21:53:41 2017 -0500

--
 .../apache/edgent/connectors/iot/IotDevice.java |   8 +-
 .../edgent/connectors/iot/IotGateway.java   | 137 ---
 .../edgent/connectors/iot/package-info.java |  22 ++-
 3 files changed, 138 insertions(+), 29 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/26c198b6/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/IotDevice.java
--
diff --git 
a/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/IotDevice.java 
b/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/IotDevice.java
index 046bc95..16d81f4 100644
--- 
a/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/IotDevice.java
+++ 
b/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/IotDevice.java
@@ -28,7 +28,7 @@ import org.apache.edgent.topology.TopologyElement;
 import com.google.gson.JsonObject;
 
 /**
- * Generic Internet of Things device connector.
+ * A generic IoT device IoT hub connector.
  * 
  * IotDevice characteristics:
  * 
@@ -41,9 +41,9 @@ import com.google.gson.JsonObject;
  * for the same logical device, false otherwise.
  * {@code IotDevice.hashCode()} returns the same value for all IotDevice 
instances
  * for the same logical device.
- * {@code IotDevice} may be used as a {@link 
org.apache.edgent.topology.TWindow TWindow} partition key. 
  * 
  * 
+ * @see Edgent 
generic IoT device model
  * @see IotGateway
  */
 public interface IotDevice extends TopologyElement {
@@ -56,14 +56,14 @@ public interface IotDevice extends TopologyElement {
 /**
  * Get the device's opaque device type identifier.
  * TODO remove the "default" - avoids compilation errors while discussing 
this.
- * @return
+ * @return the device's type
  */
 public default String getDeviceType() { return "a-device-type-id"; }
 
 /**
  * Get the device's unique opaque device identifier.
  * TODO remove the "default" - avoids compilation errors while discussing 
this.
- * @return
+ * @return the device's id
  */
 public default String getDeviceId() { return "a-device-id"; }
 

http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/26c198b6/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/IotGateway.java
--
diff --git 
a/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/IotGateway.java 
b/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/IotGateway.java
index d714d74..4988ba1 100644
--- 
a/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/IotGateway.java
+++ 
b/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/IotGateway.java
@@ -19,48 +19,117 @@ under the License.
 
 package org.apache.edgent.connectors.iot;
 
-import java.util.Collection;
 import java.util.Map;
+import java.util.Set;
 
+import org.apache.edgent.function.Function;
+import org.apache.edgent.function.UnaryOperator;
+import org.apache.edgent.topology.TSink;
 import org.apache.edgent.topology.TStream;
 
 import com.google.gson.JsonObject;
 
 /**
- * A generic IoT Gateway device connector.
+ * A generic IoT gateway device IoT hub connector.
  * 
- * An IoT Gateway device is a conduit for a collection of IoT devices 
+ * An IoT gateway device is a conduit for a collection of IoT devices 
  * that lack direct connection to the enterprise IoT hub.
  * 
- * The IoT Gateway device is an {@link IotDevice}.  Events can be published
- * that are from the gateway device and commands can be received that are 
targeted for it
- * using the IotGateway's {@code events()} and {@code commands()}.
+ * An IoT gateway device is an IoT device.  Events can be published
+ * that are from the gateway's deviceId and commands can be received that are 
targeted for it
+ * using the gateway's {@link IotDevice#events(TStream, String, int) events()}
+ * and {@link IotDevice#commands(String...) commands()}.
  * 
- * Use {@link #getIotDevice(Map)} to get an IotDevice for a connected device.
+ * Use {@link #getIotDevice(Map)} to get an {@code IotDevice} for a gateway 
connected device
+ * or {@link #getIotDeviceId(Map)} to

[11/13] incubator-edgent git commit: tidy up things

2017-02-26 Thread dlaboss
tidy up things

Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/5647338d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/5647338d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/5647338d

Branch: refs/heads/master
Commit: 5647338d365ee23745cffb9b020fd113fd9f6aca
Parents: 65ef2cb
Author: Dale LaBossiere 
Authored: Sun Feb 26 15:02:15 2017 -0500
Committer: Dale LaBossiere 
Committed: Sun Feb 26 15:02:15 2017 -0500

--
 RELEASE_NOTES   |  3 +-
 .../samples/connectors/iotp/IotpAppClient.java  |  2 +-
 .../connectors/iotp/IotpDeviceSample.java   | 16 +++
 .../connectors/iotp/IotpGWDeviceSample.java | 45 +---
 scripts/connectors/iotp/README  | 36 
 5 files changed, 66 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/5647338d/RELEASE_NOTES
--
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index fc59787..d9dba00 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -15,6 +15,7 @@ workspace. See DEVELOPMENT.md for information about building 
Edgent.
 New Features
 
 EDGENT-377  Add IotGateway and IotpGateway
+This feature is incubating.  See the classes Javadoc.
 EDGENT-376  Support an edge device using both the Edgent API and WIoTP 
"Managed Device" APIs
 EDGENT-375  Support publishing WIoTP device events using HTTP
 EDGENT-370  Add static IotProvider.getPreferences()
@@ -26,7 +27,7 @@ None
 
 Known Issues
 
-None yet
+Open JIRAs may be found at https://issues.apache.org/jira/browse/EDGENT
 
 Bug Fixes
 -

http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/5647338d/samples/connectors/src/main/java/org/apache/edgent/samples/connectors/iotp/IotpAppClient.java
--
diff --git 
a/samples/connectors/src/main/java/org/apache/edgent/samples/connectors/iotp/IotpAppClient.java
 
b/samples/connectors/src/main/java/org/apache/edgent/samples/connectors/iotp/IotpAppClient.java
index 959f218..adc7a8f 100644
--- 
a/samples/connectors/src/main/java/org/apache/edgent/samples/connectors/iotp/IotpAppClient.java
+++ 
b/samples/connectors/src/main/java/org/apache/edgent/samples/connectors/iotp/IotpAppClient.java
@@ -126,7 +126,7 @@ public class IotpAppClient {
 jo.addProperty("num", 12345);
 JsonObject data = jo;
 
-System.out.println("Sending "+iotpDevType+"/"+iotpDevId+" command: 
"+command+" data("+data.getClass().getName()+")="+data);
+System.out.println("Sending "+iotpDevType+"/"+iotpDevId+" command: 
"+command+" data: "+data);
 
 boolean ok = client.publishCommand(iotpDevType, iotpDevId, command, data);
 

http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/5647338d/samples/connectors/src/main/java/org/apache/edgent/samples/connectors/iotp/IotpDeviceSample.java
--
diff --git 
a/samples/connectors/src/main/java/org/apache/edgent/samples/connectors/iotp/IotpDeviceSample.java
 
b/samples/connectors/src/main/java/org/apache/edgent/samples/connectors/iotp/IotpDeviceSample.java
index a88dfe1..755890f 100644
--- 
a/samples/connectors/src/main/java/org/apache/edgent/samples/connectors/iotp/IotpDeviceSample.java
+++ 
b/samples/connectors/src/main/java/org/apache/edgent/samples/connectors/iotp/IotpDeviceSample.java
@@ -39,11 +39,10 @@ import com.ibm.iotf.devicemgmt.device.ManagedDevice;
 
 /**
  * Similar to IotpQuickstart2 but for a real/non-quickstart WIoTP account
- * for a registered device
- * AND it subscribes to/prints device cmds.
+ * for a registered device AND it subscribes to/prints device cmds.
  * 
- * Use IotpAppClient or any other technique to generate cmds. 
- * e.g., mosquitto_{pub,sub} cmds are printed below.
+ * Use IotpAppClient to print published events and generate a command
+ * (start this app before running IotpAppClient). 
  * 
  * This sample demonstrates:
  * 
@@ -85,12 +84,8 @@ public class IotpDeviceSample {
 System.out.println("DeviceType: " + iotpDevType);
 System.out.println("DeviceId:   " + iotpDevId);
 
-System.out.println("device clientId:  " + 
"d:"+iotpOrg+":"+iotpDevType+":"+iotpDevId);
-System.out.println("WIoTP host: " + 
iotpOrg+".messaging.internetofthings.ibmcloud.com");
-System.out.println("evt topic: " + 
"iot-2/type/"+iotpDevType+"/id/"+iotpDevId+"/evt/+/fmt/json");
-System.out.println("cmd topic: " + 
"iot-2/type/"+iotpDevType+"/id/"+iotpDevId+"/cmd/+/fmt/json");
-System.out.println("mosquitto_pub -u  -P 
 -h "+iotpOrg+".messaging.internet

[10/13] incubator-edgent git commit: Add to RELEASE_NOTES

2017-02-26 Thread dlaboss
Add to RELEASE_NOTES

Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/65ef2cbc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/65ef2cbc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/65ef2cbc

Branch: refs/heads/master
Commit: 65ef2cbcbe8b80c44322272911424e8e3be5da6f
Parents: 2182c35
Author: Dale LaBossiere 
Authored: Fri Feb 24 22:01:51 2017 -0500
Committer: Dale LaBossiere 
Committed: Fri Feb 24 22:01:51 2017 -0500

--
 RELEASE_NOTES | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/65ef2cbc/RELEASE_NOTES
--
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index b6b3f33..fc59787 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -14,6 +14,7 @@ workspace. See DEVELOPMENT.md for information about building 
Edgent.
 
 New Features
 
+EDGENT-377  Add IotGateway and IotpGateway
 EDGENT-376  Support an edge device using both the Edgent API and WIoTP 
"Managed Device" APIs
 EDGENT-375  Support publishing WIoTP device events using HTTP
 EDGENT-370  Add static IotProvider.getPreferences()



[01/13] incubator-edgent git commit: update package-info

2017-02-26 Thread dlaboss
Repository: incubator-edgent
Updated Branches:
  refs/heads/master 2d94ce06b -> 4744f56bb


update package-info

Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent/commit/48bbb100
Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent/tree/48bbb100
Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent/diff/48bbb100

Branch: refs/heads/master
Commit: 48bbb100843e21bed80634f9e409cdb2ec8de1b0
Parents: 8286236
Author: Dale LaBossiere 
Authored: Wed Feb 1 16:40:36 2017 -0500
Committer: Dale LaBossiere 
Committed: Fri Feb 24 21:53:40 2017 -0500

--
 .../org/apache/edgent/connectors/iot/package-info.java| 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-edgent/blob/48bbb100/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/package-info.java
--
diff --git 
a/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/package-info.java
 
b/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/package-info.java
index a7bcde6..0e85756 100644
--- 
a/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/package-info.java
+++ 
b/connectors/iot/src/main/java/org/apache/edgent/connectors/iot/package-info.java
@@ -18,9 +18,15 @@ under the License.
 */
 
 /**
- * Edgent device connector API to a message hub.
+ * Edgent IoT device and IoT Gateway device connector API to an IoT message 
hub.
  * 
- * Generic device model that supports a device model consisting of:
+ * An IoT device can publish device events and receive device commands from an 
IoT hub.
+ * An IoT Gateway device is an IoT device that also acts as a conduit for
+ * its "connected" IoT devices.  The connected devices lack direct 
connectivity to the
+ * IoT hub.  Their events are published and their commands are received via 
the gateway.
+ * 
+ * 
+ * More specifically, the generic device model consists of:
  * 
  * 
  * Device events - A device {@link 
org.apache.edgent.connectors.iot.IotDevice#events(org.apache.edgent.topology.TStream,
 String, int) publishes} events as messages to a message hub to allow