@Override
 public void handleGET(CoapExchange exchange) {
   if (content != null) {
     exchange.respond(content);
   } else {
     String subtree = LinkFormat.serializeTree(this);
     exchange.respond(ResponseCode.CONTENT, subtree, MediaTypeRegistry.APPLICATION_LINK_FORMAT);
   }
 }
Beispiel #2
0
 @Override
 public void handleGET(CoapExchange exchange) {
   exchange.respond(CONTENT, LinkFormat.serializeTree(this), APPLICATION_LINK_FORMAT);
 }