All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.microsoft.azure.sdk.iot.service.registry.DeviceConnectionState Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) Microsoft. All rights reserved.
 * Licensed under the MIT license. See LICENSE file in the project root for full license information.
 */

package com.microsoft.azure.sdk.iot.service.registry;

/**
 * Enum for device connection state
 */
public enum DeviceConnectionState
{
    Disconnected("Disconnected"),
    Connected("Connected");

    private final String connectionState;

    DeviceConnectionState(String state)
    {
        this.connectionState = state;
    }

    public String getValue()
    {
        return connectionState;
    }

    public static DeviceConnectionState fromString(String connectionState)
    {
        for (DeviceConnectionState possibleConnectionState : DeviceConnectionState.values())
        {
            if (possibleConnectionState.connectionState.equalsIgnoreCase(connectionState))
            {
                return possibleConnectionState;
            }
        }
        return null;
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy