com.microsoft.azure.sdk.iotcentral.device.callbacks.ConnectionStatus Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of iotc-java-device-client Show documentation
Show all versions of iotc-java-device-client Show documentation
The Azure IoTCentral Device client for Java and Android
// Copyright (c) Luca Druda. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
package com.microsoft.azure.sdk.iotcentral.device.callbacks;
import java.util.List;
import com.microsoft.azure.sdk.iot.device.IotHubConnectionStatusChangeCallback;
import com.microsoft.azure.sdk.iot.device.IotHubConnectionStatusChangeReason;
import com.microsoft.azure.sdk.iot.device.transport.IotHubConnectionStatus;
import com.microsoft.azure.sdk.iotcentral.device.enums.IOTC_CONNECTION_STATE;
public class ConnectionStatus implements IotHubConnectionStatusChangeCallback {
private List callbacks;
public ConnectionStatus(List callbacks) {
this.callbacks = callbacks;
}
@Override
public void execute(IotHubConnectionStatus status, IotHubConnectionStatusChangeReason statusChangeReason,
Throwable throwable, Object callbackContext) {
for (int i = 0; i < this.callbacks.size(); i++) {
this.callbacks.get(i).Exec(IOTC_CONNECTION_STATE.valueOf(statusChangeReason.name()));
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy