use of org.eclipse.leshan.client.request.ServerIdentity in project leshan by eclipse.
the class RootResource method handleDELETE.
@Override
public void handleDELETE(CoapExchange exchange) {
if (!StringUtils.isEmpty(exchange.getRequestOptions().getUriPathString())) {
exchange.respond(ResponseCode.METHOD_NOT_ALLOWED);
return;
}
ServerIdentity identity = ResourceUtil.extractServerIdentity(exchange, bootstrapHandler);
BootstrapDeleteResponse response = bootstrapHandler.delete(identity, new BootstrapDeleteRequest());
exchange.respond(toCoapResponseCode(response.getCode()), response.getErrorMessage());
}
Aggregations