Re-factor and upgrade to support Java 8 CompletableFutures as well as AdvancedClient capabilities
The squashed commits include:
Move clients to separate package; fix SimpleClient integration test
Move common test functionality to TestHelper
Add SegmentedClient integration test
Reduce logging messages; add documentation
Bump version; remove unnecessary logging configuration
doclint turns javadoc warnings into errors; ignore for now
see http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html
Add snapshot repository for deploying snapshots
Bump major version due to platform change (Java 7 to Java 8)
Add sync retrieval integration test
Re-factor locations of classes: all interfaces in top level folder, change name of PipelineStage to ProcessingStage
In progress commit, tests broken
Refactor, WIP
Tweak synchronization, processing of segmented packets
Move tests around
Fix TestHelper bug
Complete tests
WIP
Add streaming test
Fix segmented server integration test
Finish refactoring
Update POM and README
Update documentation
diff --git a/README.md b/README.md
index e37853d..eecff9e 100644
--- a/README.md
+++ b/README.md
@@ -12,14 +12,25 @@
</dependency>
```
+## Build
+
+To build, run `mvn install` in the cloned directory. Additionally, you may want
+to run integration tests by running the `nfd-integration-tests` profile with
+a running NFD instance (see [pom.xml](https://github.com/01org/jndn-utils/blob/master/pom.xml) for more details);
+
## Use
-Use `SimpleClient` or `SegmentedClient` to retrieve data from the network. For example:
+
+This library provides `Client`, `Server` and `Repository` interfaces. These
+are implemented in their respective `impl` packages and require Java 8.
+
+Use a `SimpleClient` or `AdvancedClient` (provides segmentation, retries, and streaming)
+ to retrieve data from the network. For example:
```
// retrieve a single Data packet synchronously, will block until complete
-Data singleData = Client.getDefault().getSync(face, name);
+Data singleData = SimpleClient.getDefault().getSync(face, name);
-// retrieve a segmented Data packet (i.e. with a last Component containing a segment number and a valid FinalBlockId) by name
-Data segmentedData = SegmentedClient.getDefault().getSync(face, name);
+// retrieve segmented Data packets (i.e. with a last Component containing a segment number and a valid FinalBlockId) by name
+CompletableFuture<Data> segmentedData = AdvancedClient.getDefault().getAsync(face, name);
```
Use `SimpleServer` or `SegmentedServer` to serve data on the network. For example:
@@ -32,10 +43,19 @@
server.addPipelineStage(new SigningStage(keyChain, signingCertificateName));
```
-For full API, see the [Javadoc](http://01org.github.io/jndn-utils/).
+For the full API, see the [Javadoc](http://01org.github.io/jndn-utils/).
+
+## Logging
+
+`jndn-utils` uses Java's default logging utilities (see http://docs.oracle.com/javase/7/docs/api/java/util/logging/package-summary.html). Most messages are logged with the FINER or FINEST status; one way to change this is to add a `logging.properties` file in the classpath with the following lines:
+```
+handlers=java.util.logging.ConsoleHandler
+.level=FINEST
+java.util.logging.ConsoleHandler.level=FINEST
+```
## License
-Copyright © 2015, Intel Corporation.
+Copyright © 2015, Intel Corporation.
This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU Lesser General Public License, version 3, as published by the Free Software Foundation.