An NSURLHandle instance is used to manage the resource
data corresponding to an NSURL object. A single
NSURLHandle can be used to manage multiple
NSURL objects as long as those
objects all refer to the same resource.
Different NSURLHandle subclasses are used to
manage different types of URL (usually based on the
scheme of the URL), and you can register new
subclasses to extend (or replace) the standard
ones.
GNUstep comes with private subclasses to handle the
common URL schemes -
Returns the resource data that is currently
available for the handle. This may be a partially
loaded resource or may be empty if no data has been
loaded yet or the last load failed.
This method should be called when a background load
fails. The method passes the failure
notification to the clients of the handle - so
subclasses should call super's implementation at
the end of their implementation of this method.
This method is called by when a background load
begins. Subclasses should call super's
implementation at the end of their
implementation of this method.
This method should be called to cancel a load
currently in progress. The method calls
-endLoadInBackground
Subclasses should call super's implementation at
the end of their implementation of this method.
Method called by subclasses during process of
loading a resource. The base class maintains a copy
of the data being read in and accumulates separate parts
of the data.
This method is called to stop any background loading
process.
-cancelLoadInBackground
uses this method to cancel loading. Subclasses should
call super's implementation at the end of their
implementation of this method.
Initialises a handle with the specified URL.
The flag determines whether the handle will
cache resource data and respond to requests from
equivalent URLs for the cached data.
Starts (or queues) loading of the handle's resource
data in the background (asynchronously). The
default implementation uses loadInForeground - if
this method is not overridden, loadInForeground MUST
be.
Loads the handle's resource data in the foreground
(synchronously). The default
implementation starts a background load and
waits for it to complete - if this method is not
overridden, loadInBackground MUST be.
Writes resource data to the handle.
Returns YES on success,
NO on failure.
The GNUstep implementation for file: writes
the data directly to the local filesystem,
and the return status reflects the result of that
write operation.
The GNUstep implementation for http: and
https: sets the specified data
as information to be POSTed to the URL next time it is
loaded - so the method always returns
YES.
The GNUstep implementation for ftp: sets the
specified data as information to be
written to the URL next time it is loaded - so
the method always returns YES.
Sets a property for handle. Returns YES
on success, NO on failure.
The GNUstep implementation sets the property as a
header to be sent the next time the URL is loaded,
and recognizes some special property keys which
control the behavior of the next load.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Sent by the NSURLHandle object when some data becomes
available from the handle. Note that this does
not mean that all data has become available, only that
a chunk of data has arrived.