This class is an
NSCoder
implementation specialized for sending
objects over network connections for immediate use
(as opposed to the archivers which persist objects for
reconstitution after an indefinite term). It
is used to help implement the distributed objects
framework by the
NSConnection
class. Even for highly specialized applications,
you probably do not need to use this class directly.
Returns YES if receiver is in the
process of encoding objects by copying them (rather
than substituting a proxy). This method is mainly
needed internally and by subclasses.
Returns YES if receiver will
substitute a proxy when encoding objects rather
than by copying them. This method is mainly needed
internally and by subclasses.
Must return the class that will be created on the
remote side of the connection. If the class to be
created is not the same as that of the object
returned by replacementObjectForPortCoder: then
the class must be capable of recognising the object it
actually gets in its initWithCoder: method. The
default operation is to return NSDistantObject
unless the object is being sent bycopy, in which
case the objects actual class is returned. To force
bycopy operation the object should return its own
class. Override to substitute class when an
instance is being serialized by an
NSPortCoder
. Default implementation returns
-classForCoder
.
This message is sent to an object about to be encoded
for sending over the wire. The default action is to
return an NSDistantObject which is a local proxy for
the object unless the object is being sent bycopy, in
which case the actual object is returned. To force
bycopy, an object should return itself.
Returns the actual object to be encoded for sending
over the network on a Distributed Objects connection.
The default implementation returns self if
the receiver is being sent bycopy and returns
a proxy otherwise. Subclasses may override this
method to change this behavior, eg. to ensure that
they are always copied.