NSDistantObject Mac OS X 10.0

This subclass of NSProxy is used in distributed objects applications to locally represent objects that have been vended by a remote process. NSDistantObject operates by forwarding any messages it receives to the local NSConnection object, which then passes the invocation to the NSConnection object of the remote process. Return values received by the NSConnection object are passed to the message originator through the same instance of NSDistantObject that forwarded the message.


@interface NSDistantObject : NSProxy <NSCoding>
 // Initializers
   - (id)initWithLocal:(id)target connection:(NSConnection *)connection;
   - (id)initWithTarget:(id)target connection:(NSConnection *)connection;
 // Accessor Methods
   - (void)setProtocolForProxy:(Protocol *)proto;
 // Class Methods
   + (NSDistantObject *)proxyWithLocal:(id)target connection:(NSConnection *)connection;
   + (NSDistantObject *)proxyWithTarget:(id)target connection:(NSConnection *)connection;
 // Instance Methods
   - (NSConnection *)connectionForProxy;
 // Methods Implementing NSCoding
   - (void)encodeWithCoder:(NSCoder *)aCoder;
   - (id)initWithCoder:(NSCoder *)aDecoder;

    Part II: API Quick Reference
    Chapter 13. Foundation Classes