public class UPnPStatus extends Object
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.
| 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 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.
|
| 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.
|
public static final int ACTION_FAILED
public static final int INVALID_ACTION
public static final int INVALID_ARGS
public static final int INVALID_VAR
public static final int OUT_OF_SYNC
public static final int PRECONDITION_FAILED
public UPnPStatus()
public UPnPStatus(int code,
String desc)
code - the status codedesc - the status descriptionpublic static final String code2String(int code)
code - the UPnP status code to convertpublic int getCode()
public String getDescription()
public void setCode(int code)
code - the status code to setpublic void setDescription(String description)
description - the status description to set