Callback: onResourceExecuteRequest

Last modified: Jul 5, 2019 @ 06:43

Notifies the gateway implementation that DDM wants to execute a resource.

The implementation is expected to respond with a ResourceExecuteResponse.

The following is an example of the callback:

@Override
public void onResourceExecuteRequest(String correlationId, String endpoint, ResourceLink resourceLink) {
  // Get the device by the endpoint value and execute the resource
  ResponseCode responseCode = new ResponseCode(ResponseCode.CONTENT, "Executing resource was easy.");
  try {
    getGateway().sendResourceExecuteResponse(correlationId, endpoint, responseCode);
  } catch (GatewayException e) {
    logger.log(Level.WARNING, "Failed to send response to DDM", e);
  }
}

The following message sequence chart shows the Resource Execute process.