./
spdfhttperrorreporter__define.pro
This class represents an object that is used to report HTTP errors.
Notes:
- This class exists in both the CDAS and SSC web service IDL libraries. They should be kept identical to void incompatiblities for clients that use both libraries simultaneously.
- As of release 1.7.35 of the CDAS library the retryAfterTime field and associated logic is obsolete. The SpdfRest class now handles a 429/503 http response with a Retry-After header itself and never calls this class for those responses. The code here has not yet been deleted because of note 1 above.
Author information
- Author
B. Harris
- Copyright
Copyright (c) 2010-2021 United States Government as represented by the National Aeronautics and Space Administration. No copyright is claimed in the United States under Title 17, U.S.Code. All Other Rights Reserved.
Class description for SpdfHttpErrorReporter
Routines
Routines from spdfhttperrorreporter__define.pro
result = SpdfHttpErrorReporter::init()
Creates an SpdfHttpErrorReporter object.
SpdfHttpErrorReporter::cleanup
Performs cleanup operations when this object is destroyed.
SpdfHttpErrorReporter::reportError, responseCode, responseHeader, responseFilename
This procedure is called when an HTTP error occurs.
SpdfHttpErrorReporter::printResponse, responseFilename
This procedure prints some diagnostic information from the given HTTP error response file.
SpdfHttpErrorReporter::waitUntilRetryAfterTime
Suspends execution until after any retryAfterTime.
result = SpdfHttpErrorReporter::getRetryAfterTime()
Gets the retryAfterTime value.
SpdfHttpErrorReporter__define
Defines the SpdfHttpErrorReporter class.
Routine details
top source SpdfHttpErrorReporter::init
result = SpdfHttpErrorReporter::init()
Creates an SpdfHttpErrorReporter object.
Return value
reference to an SpdfHttpErrorReporter object.
top source SpdfHttpErrorReporter::cleanup
SpdfHttpErrorReporter::cleanup
Performs cleanup operations when this object is destroyed.
top source SpdfHttpErrorReporter::reportError
SpdfHttpErrorReporter::reportError, responseCode, responseHeader, responseFilename
This procedure is called when an HTTP error occurs. This default implementation merely prints some diagnostic information.
Parameters
- responseCode in type=int
the HTTP response code of the request causing the error.
- responseHeader in type=string
the HTTP response header of the request causing the error.
- responseFilename in type=string
the name of an error response file sent when the error occurred.
top source SpdfHttpErrorReporter::printResponse
SpdfHttpErrorReporter::printResponse, responseFilename
This procedure prints some diagnostic information from the given HTTP error response file. It only recognizes the "typical" error response from the web services.
Parameters
- responseFilename in type=string
the name of an error response file sent when the error occurred.
top source SpdfHttpErrorReporter::waitUntilRetryAfterTime
SpdfHttpErrorReporter::waitUntilRetryAfterTime
Suspends execution until after any retryAfterTime. If there has been no HTTP 429/503/RetryAfter condition or the current time is after the retryAfterTime, then no suspension occurs.
top source SpdfHttpErrorReporter::getRetryAfterTime
result = SpdfHttpErrorReporter::getRetryAfterTime()
Gets the retryAfterTime value.
Return value
the number of seconds elapsed since 1970-01-01 when we can retry a request following an HTTP response with status 429/503 and an HTTP Retry-After header value.
File attributes
Modification date: | Fri May 13 08:54:13 2022 |
Lines: | 72 |
SSC Feedback.