Example #1
0
 /*
  * GET only debug return endpoint identifier
  */
 @Override
 public void handleGET(CoapExchange exchange) {
   exchange.setMaxAge((int) Math.max((expiryTime - System.currentTimeMillis()) / 1000, 0));
   exchange.respond(
       ResponseCode.CONTENT, endpointIdentifier + "." + domain, MediaTypeRegistry.TEXT_PLAIN);
 }
Example #2
0
  @Override
  public void handleGET(CoapExchange exchange) {

    exchange.setMaxAge(5);
    exchange.respond(CONTENT, time, TEXT_PLAIN);
  }