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

public class UPnPStatusextends 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

    Modifier and Type
    Field
    Description
    static final int
    Error code indicating the action execution failed for other reasons.
    private int
    /////////////////////////////////////////////
    private String
    Human-readable description of the status.
    static final int
    Error code indicating the requested action is not supported by the device.
    static final int
    Error code indicating the action arguments are invalid or missing.
    static final int
    Error code indicating the requested state variable does not exist.
    static final int
    Error code indicating the current state values are out of sync.
    static final int
    Error code indicating required preconditions are not met.
  • Constructor Summary

    Constructors
    Constructor
    Description
    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

    Modifier and Type
    Method
    Description
    static final String
    code2String(int code)
    Converts a UPnP status code to its corresponding human-readable string.
    int
    Gets the status code.
    Gets the status description.
    void
    setCode(int code)
    Sets the status code.
    void
    setDescription(String description)
    Sets the status description.

    Methods inherited from class Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • INVALID_ACTION

      public static final int INVALID_ACTION
      Error code indicating the requested action is not supported by the device.
      See Also:
    • INVALID_ARGS

      public static final int INVALID_ARGS
      Error code indicating the action arguments are invalid or missing.
      See Also:
    • OUT_OF_SYNC

      public static final int OUT_OF_SYNC
      Error code indicating the current state values are out of sync.
      See Also:
    • INVALID_VAR

      public static final int INVALID_VAR
      Error code indicating the requested state variable does not exist.
      See Also:
    • PRECONDITION_FAILED

      public static final int PRECONDITION_FAILED
      Error code indicating required preconditions are not met.
      See Also:
    • ACTION_FAILED

      public static final int ACTION_FAILED
      Error code indicating the action execution failed for other reasons.
      See Also:
    • code

      private int code
      /////////////////////////////////////////////
    • description

      private String description
      Human-readable description of the status.
  • Constructor Details

    • 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 Details

    • 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
    • setCode

      public void setCode(int code)
      Sets the status code.
      Parameters:
      code - the status code to set
    • getDescription

      public String getDescription()
      Gets the status description.
      Returns:
      the status description
    • setDescription

      public void setDescription(String description)
      Sets the status description.
      Parameters:
      description - the status description to set