public abstract class RealProxy
|
A client that uses an object across any kind of a remoting boundary is actually using a transparent proxy for the object. The transparent proxy provides the illusion that the actual object resides in the client's space. It achieves this by forwarding calls made on it to the real object using the remoting infrastructure.
The transparent proxy is itself housed by an instance of a managed runtime class of type RealProxy. The RealProxy implements a part of the functionality needed to forward the operations from the transparent proxy. Note that a proxy object inherits the associated semantics of managed objects such as garbage collection, support for fields and methods, and can be extended to form new classes. The proxy has a dual nature: it acts as an object of the same class as the remote object (transparent proxy), and it is a managed object itself.
A proxy object can be used without regard to any remoting subdivisions within an AppDomain.
CreateObjRef | Creates an ObjRef for the specified object type, and registers it with the remoting infrastructure as a client-activated object. |
Equals (inherited from System.Object) |
See base class member description: System.Object.Equals Derived from System.Object, the primary base class for all objects. |
GetHashCode (inherited from System.Object) |
See base class member description: System.Object.GetHashCode Derived from System.Object, the primary base class for all objects. |
GetObjectData | Adds the transparent proxy of the object represented by the current instance of RealProxy to the specified SerializationInfo. |
GetProxiedType | Returns the Type of the object that the current instance of RealProxy represents. |
GetStubData | Retrieves stub data stored for the specified proxy. |
GetTransparentProxy | Returns the transparent proxy for the current instance of RealProxy. |
GetType (inherited from System.Object) |
See base class member description: System.Object.GetType Derived from System.Object, the primary base class for all objects. |
InitializeServerObject | Initializes a new instance of the object Type of the remote object that the current instance of RealProxy represents with the specified IConstructionCallMessage. |
Invoke | When overridden in a derived class, invokes the method specified in the provided IMessage on the remote object represented by the current instance. |
SetStubData | Sets the stub data for the specified proxy. |
ToString (inherited from System.Object) |
See base class member description: System.Object.ToString Derived from System.Object, the primary base class for all objects. |
ctor #1 | Overloaded:.ctor() Default constructor. This constructor is called by derived class constructors to initialize state in this type.Initializes a new instance of the RealProxy class with default values. |
ctor #2 | Overloaded:.ctor(Type classToProxy) Initializes a new instance of the RealProxy class that represents a remote object of the specified Type. |
ctor #3 | Overloaded:.ctor(Type classToProxy, IntPtr stub, object stubData) Initializes a new instance of the RealProxy class. |
AttachServer | Attaches the current proxy instance to the specified remote MarshalByRefObject. |
DetachServer | Detaches the current proxy instance from the remote server object that it represents. |
Finalize (inherited from System.Object) |
See base class member description: System.Object.Finalize Derived from System.Object, the primary base class for all objects. |
GetUnwrappedServer | Returns the server object represented by the current proxy instance. |
MemberwiseClone (inherited from System.Object) |
See base class member description: System.Object.MemberwiseClone Derived from System.Object, the primary base class for all objects. |
Hierarchy:
protected RealProxy(); |
protected RealProxy( |
classToProxy
Exception Type | Condition |
---|---|
ArgumentException | classToProxy is not an interface, and is not derived from MarshalByRefObject. |
A client that uses an object across any kind of a remoting boundary is actually using a transparent proxy for the object. The transparent proxy gives the impression that the actual object resides in the client's space. It achieves this by forwarding calls made on it to the real object using the remoting infrastructure.
The transparent proxy is housed by an instance of a managed runtime class RealProxy. The RealProxy implements a part of the functionality needed to forward the operations from the transparent proxy. Note that a proxy object inherits the associated semantics of managed objects such as garbage collection, support for fields and methods, and can be extended to form new classes. The proxy has a dual nature: it acts as an object of the same class as the remote object (transparent proxy), and is a managed object itself.
classToProxy
stub
stubData
Exception Type | Condition |
---|---|
ArgumentException | classToProxy is not an interface, and is not derived from MarshalByRefObject. |
protected void AttachServer( |
s
requestedType
protected MarshalByRefObject DetachServer(); |
~RealProxy(); |
public virtual int GetHashCode(); |
public virtual void GetObjectData( |
info
context
Exception Type | Condition |
---|---|
ArgumentNullException | The obj or info parameter is null. |
public Type GetProxiedType(); |
rp
public virtual object GetTransparentProxy(); |
public Type GetType(); |
protected MarshalByRefObject GetUnwrappedServer(); |
public IConstructionReturnMessage InitializeServerObject( |
ctorMsg
msg
The IMessage parameter provides a dictionary through the IMessage.Properties property. The dictionary contains name/value pairs of information about the method call, such as the name of the method called and its parameters.
protected object MemberwiseClone(); |
rp
stubData
public virtual string ToString(); |