org.cybergarage.upnp

## Class UPnPStatus

- java.lang.Object
- - org.cybergarage.upnp.UPnPStatus

-     public class UPnPStatus
      extends Object

  Represents the status of UPnP operations and provides standard UPnP error codes.

  This class encapsulates UPnP status codes and their corresponding descriptions for error handling in UPnP operations. It includes standard UPnP error codes defined by the UPnP Device Architecture specification.

  The class provides both static utility methods for converting error codes to human-readable strings and instance methods for storing and retrieving status information.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `ACTION_FAILED` Error code indicating the action execution failed for other reasons.
    `static int` | `INVALID_ACTION` Error code indicating the requested action is not supported by the device.
    `static int` | `INVALID_ARGS` Error code indicating the action arguments are invalid or missing.
    `static int` | `INVALID_VAR` Error code indicating the requested state variable does not exist.
    `static int` | `OUT_OF_SYNC` Error code indicating the current state values are out of sync.
    `static int` | `PRECONDITION_FAILED` Error code indicating required preconditions are not met.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `UPnPStatus()` Creates a new UPnPStatus with default values (code 0, empty description).
    `UPnPStatus(int code, String desc)` Creates a new UPnPStatus with the specified code and description.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `code2String(int code)` Converts a UPnP status code to its corresponding human-readable string.
    `int` | `getCode()` Gets the status code.
    `String` | `getDescription()` Gets the status description.
    `void` | `setCode(int code)` Sets the status code.
    `void` | `setDescription(String description)` Sets the status description.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### ACTION_FAILED

          public static final int ACTION_FAILED

      Error code indicating the action execution failed for other reasons.
      See Also:
        Constant Field Values

    - #### INVALID_ACTION

          public static final int INVALID_ACTION

      Error code indicating the requested action is not supported by the device.
      See Also:
        Constant Field Values

    - #### INVALID_ARGS

          public static final int INVALID_ARGS

      Error code indicating the action arguments are invalid or missing.
      See Also:
        Constant Field Values

    - #### INVALID_VAR

          public static final int INVALID_VAR

      Error code indicating the requested state variable does not exist.
      See Also:
        Constant Field Values

    - #### OUT_OF_SYNC

          public static final int OUT_OF_SYNC

      Error code indicating the current state values are out of sync.
      See Also:
        Constant Field Values

    - #### PRECONDITION_FAILED

          public static final int PRECONDITION_FAILED

      Error code indicating required preconditions are not met.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### UPnPStatus

          public UPnPStatus()

      Creates a new UPnPStatus with default values (code 0, empty description).

    - #### UPnPStatus

          public UPnPStatus(int code,
                            String desc)

      Creates a new UPnPStatus with the specified code and description.
      Parameters:
        `code` - the status code
        `desc` - the status description

  - ### Method Detail

    - #### code2String

          public static final String code2String(int code)

      Converts a UPnP status code to its corresponding human-readable string.
      Parameters:
        `code` - the UPnP status code to convert
      Returns:
        the human-readable description of the status code

    - #### getCode

          public int getCode()

      Gets the status code.
      Returns:
        the status code

    - #### getDescription

          public String getDescription()

      Gets the status description.
      Returns:
        the status description

    - #### setCode

          public void setCode(int code)

      Sets the status code.
      Parameters:
        `code` - the status code to set

    - #### setDescription

          public void setDescription(String description)

      Sets the status description.
      Parameters:
        `description` - the status description to set