Add more debugging detail
diff --git a/src/main/java/com/intel/jndn/mock/MockFace.java b/src/main/java/com/intel/jndn/mock/MockFace.java
index fbf9a2f..8fb1f39 100644
--- a/src/main/java/com/intel/jndn/mock/MockFace.java
+++ b/src/main/java/com/intel/jndn/mock/MockFace.java
@@ -73,10 +73,10 @@
/**
* Handle incoming Interest packets; when an Interest is expressed through
* expressInterest(), this will run to determine if: 1) any responses have
- * been registered or 2) if any OnInterest handlers have been registered.
- * If one of these two succeeds, this method then re-directs the Interest from
+ * been registered or 2) if any OnInterest handlers have been registered. If
+ * one of these two succeeds, this method then re-directs the Interest from
* traveling down the network stack and returns data.
- *
+ *
* @param interest
*/
protected void handleIncomingRequests(Interest interest) {
@@ -87,14 +87,12 @@
logger.debug("Found response for: " + interestName);
Data data = responseMap.get(interestName);
((MockTransport) node_.getTransport()).respondWith(data);
- }
- // check if handler registered
+ } // check if handler registered
else if (registeredPrefixId != -1) {
logger.debug("Found handler for: " + interestName);
MockOnInterestHandler handler = handlerMap.get(findRegisteredHandler(interest));
handler.onInterest.onInterest(handler.prefix, interest, node_.getTransport(), registeredPrefixId);
- }
- // log failure
+ } // log failure
else {
logger.warn("No response found for interest (aborting): " + interestName);
}
@@ -103,9 +101,9 @@
/**
* Find a handler that matches the incoming interest; currently, the only
* flags supported are the ChildInherit flags.
- *
+ *
* @param interest
- * @return
+ * @return
*/
protected long findRegisteredHandler(Interest interest) {
for (Entry<Long, MockOnInterestHandler> entry : handlerMap.entrySet()) {
diff --git a/src/main/java/com/intel/jndn/mock/MockTransport.java b/src/main/java/com/intel/jndn/mock/MockTransport.java
index fd9a340..819fbdc 100644
--- a/src/main/java/com/intel/jndn/mock/MockTransport.java
+++ b/src/main/java/com/intel/jndn/mock/MockTransport.java
@@ -134,7 +134,7 @@
*/
@Override
public void send(ByteBuffer data) throws IOException {
- logger.debug("Sending " + (data.capacity() - data.position()) + " bytes");
+ logger.debug("Sending " + (data.capacity() - data.position()) + " bytes: " + Arrays.toString(data.array()));
// add to sent bytes
buffer.put(data);