Package com.castlabs.android.drm
Class DrmTodayResponseCode
java.lang.Object
com.castlabs.android.drm.DrmTodayResponseCode
DRMToday response code holder and parser.
This class handles the parsing and representation of DRMToday service response codes,
which are used to indicate the status or error conditions of DRM operations.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceAnnotation that defines the valid error codes for DRMToday responses. -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intThe numeric response code from the DRMToday service.final StringThe original string representation of the response code. -
Method Summary
Modifier and TypeMethodDescriptionstatic DrmTodayResponseCodeParses response headers and creates correspondingDrmTodayResponseCode.
-
Field Details
-
responseCode
public final int responseCodeThe numeric response code from the DRMToday service. This field contains the parsed integer value of the response code. -
responseCodeString
The original string representation of the response code. This field contains the raw response code as received from the service.
-
-
Method Details
-
create
@Nullable public static DrmTodayResponseCode create(@Nullable Map<String, List<String>> responseHeaders) Parses response headers and creates correspondingDrmTodayResponseCode. This method extracts the DRMToday response code from HTTP response headers and creates a new instance with the parsed code.- Parameters:
responseHeaders- HTTP response headers to be parsed for the error code- Returns:
DrmTodayResponseCodeornullif the response code is not available
-