Copyright ã1994 by NeXT Computer, Inc.  All Rights Reserved.

NSDistantObject 

Inherits From:	NSProxy

Conforms To:	NSCoding
NSObject (NSProxy)

Declared In:	Foundation/NSDistantObject.h 

Class Description

The NSDistantObject class declares the programmatic interface to objects that serve as proxies to remote real objects.

Your application does not in general need to explicitly create NSDistantObject objectsÐthey are created automatically when you create NSConnection objects for a remote object.

Exceptions

NSDistantObject raises an NSInternalInconsistencyException for a variety of exceptions resulting from internal consistency failures.

Building a Proxy

+ (NSDistantObject *)proxyWithLocal:(id)target	Builds and returns a local proxy for a local object target,
connection:(NSConnection *)connection		forming a remote proxy on the other side of connection.

+ (NSDistantObject *)proxyWithTarget:(id)target	Builds and returns a remote proxy where target is an object
connection:(NSConnection *)connection		on the other side of connection. 

Initializing a Proxy

- (id)initWithLocal:(id)target	Builds a local proxy for a local object target, forming a
connection:(NSConnection *)connection		remote proxy on the other side of connection. You may not retain or otherwise use this proxy.

- (id)initWithTarget:(id)target	Builds a remote proxy where target is an object on the other
connection:(NSConnection *)connection		side of connection. It may deallocate and return nil if this target is already known on the connection. This is the designated initializer for subclasses.

Specifying a Protocol

- (void)setProtocolForProxy:(Protocol *)proto	Sets the proxy's protocol to proto for efficiency.

Returning the Proxy's Connection

- (NSConnection *)connectionForProxy	Returns the NSConnection instance used by the proxy.