use of com.microsoft.azure.sdk.iot.device.edge.MethodResult in project azure-iot-sdk-java by Azure.
the class ModuleInvokeMethodSample method invokeMethodOnDevice.
private static MethodResult invokeMethodOnDevice(String methodName, String deviceIdToInvokeOn, ModuleClient client, MethodRequest methodRequest) throws ModuleClientException, URISyntaxException, IOException {
System.out.println("Invoking method \"" + methodName + "\" on device \"" + deviceIdToInvokeOn + "\"");
MethodResult result = client.invokeMethod(deviceIdToInvokeOn, methodRequest);
System.out.println("Finished Invoking method \"" + methodName + "\" on device \"" + deviceIdToInvokeOn + "\"");
return result;
}
Aggregations