Collection<PeerAddress> neighbors = getNeighbors(locationKey, NEIGHBOR_SIZE);
if(neighbors == null) {
//return empty neighbor set
Message response = createResponseMessage(message, Type.NOT_FOUND);
response.neighborsSet(new NeighborSet(-1, Collections.<PeerAddress>emptyList()));
responder.response(response);
return;
}
// Create response message and set neighbors
final Message responseMessage = createResponseMessage(message, Type.OK);
LOG.debug("found the following neighbors {}", neighbors);
NeighborSet neighborSet = new NeighborSet(NEIGHBOR_LIMIT, neighbors);
responseMessage.neighborsSet(neighborSet);
// check for fastget, -1 if, no domain provided, so we cannot
// check content length, 0 for content not here , > 0 content here
// int contentLength = -1;
Number160 contentKey = message.key(2);