matlab.net.http.ProgressMonitor Class
Namespace: matlab.net.http
Superclasses: handle
Progress monitor for HTTP message exchange
Description
Use the ProgressMonitor class to implement a progress monitor for an HTTP
request message. A progress monitor listens to changes in the properties of this class to
implement a display or update of your choice.
To implement a progress monitor, create a subclass of this class. Then create an
HTTPOptions object, specify that subclass as the
ProgressMonitorFcn property, and set the
UseProgressMonitor property to true.
An HTTP request starts when you call the RequestMessage.send method. The
process might involve multiple messages in both directions in the case of redirects and
authentication. MATLAB® calls the done method when all transfers have been
completed.
During a transfer:
MATLAB sets the
Max,CancelFcn, andDirectionproperties when you callRequestMessage.send.MATLAB sets the
Valueproperty repeatedly as the body of the request message is sent to indicate the number of bytes transferred.When receipt of the
ResponseMessagebegins, MATLAB setsDirectiontoResponseand again setsValuerepeatedly.To cancel the transfer at any time, call the
CancelFcnfunction. This action is the same as interrupting thesendfunction in the Command Window.
You can display a graphical progress indicator or other indication of progress after
Direction changes to Response. For each subsequent
Value, update the indicator to the current Value.
You can also use this mechanism to monitor progress programmatically.
The matlab.net.http.ProgressMonitor class is a handle class.
Creation
obj = matlab.net.http.ProgressMonitor(Name,Value) creates a progress
monitor with additional properties specified by one, or more name-value pair arguments.
Name is the property name and Value is the
corresponding value. You can specify several name-value pair arguments in any order as
Name1,Value1,...,NameN,ValueN. Unspecified properties are set to their
default values.
Properties
Methods
Version History
Introduced in R2016b