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

NSProxy 

Inherits From:	none (NXProxy is a root class) 

Conforms To:	NSObject 

Declared In:	Foundation/NSProxy 

Class Description

The NSProxy class declares the programmatic interface to proxiesÐobjects that stand in for real objects (usually descendants of the NSObject class), where the real objects may exist within the same or another process, perhaps even in a system of a different architecture across a network. To the application, the proxy behaves like the real object, though the real object may not be directly accessible, and in general, instance variables of remote objects are not accessible.

NSProxy class defines few methods, because proxies respond to few messages directly. Instead, when a proxy receives a message it doesn't respond to, it encodes the message, including the arguments, in an invocation, and invokes forwardInvocation:. Specialized subclasses then direct further processing, such as forwarding the message to a real object in the same or another process.

Methods defined in this class are methods that the NSProxy class responds to directly. Unless otherwise noted, none of these methods are forwarded to the proxy's correspondent.

Your application in general doesn't instantiate NSProxy objectsÐthey're created as instances of specialized subclasses. Proxies are reference-counted so that only a single NSProxy per connection is instantiated for any real object.

Creating and Destroying Instances	

+ (id)alloc	Returns a new, uninitialized instance of the receiving class.

+ (id)allocWithZone:(NSZone *)zone	Returns a new, uninitialized instance of the receiving class in zone.

- (void)dealloc	Deallocates the memory occupied by the receiver. 

Identifying Classes	

+ (Class)class	Returns self. Since this is a class method, it returns the class object.

Obtaining Method Information

- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
	Implemented by subclasses to return an object that contains a description of the aSelector method, or nil if the aSelector method can't be found. The NSProxy implementation of this method raises an NSInvalidArgumentException exception.

Describing Objects

- (NSString *)description	Prints the name of receiver's class and the hexadecimal value of the its id.

Forwarding Messages

- (void)forwardInvocation:(NSInvocation *)invocation
	Implemented by subclasses to forward messages to other objects. The NSProxy implementation of this method raises an NSInvalidArgumentException exception.