1.3.3 Sponsor

A Lease Object for a given Server Object maintains a list of Sponsors that are called when the TTL of the Server Object expires. Each Sponsor can specify whether the Server Object's TTL has to be extended, and can specify the duration of the extension. If there are no associated Sponsors or if none of the associated Sponsors extend the lifetime of the Server Object, then the Server Object is removed from the Server Object Table, making it unavailable to clients.

An example of a client managing the lifetime of a Server Object is shown in the following examples.

The client invokes a Remote Method on the Server Object, as follows.

Invoking a Remote Method on the Server Object

Figure 2: Invoking a Remote Method on the Server Object

The client uses the Lease Object to extend the lease time, as follows.

Extending lease time

Figure 3: Extending lease time

The client registers a Sponsor that is invoked when the Lease Object's TTL expires, as follows.

Registering a Sponsor

Figure 4: Registering a Sponsor

For more information about how leases and Sponsors are exposed in Windows, see [MSDN-RemotingLifetime].

If the client times out and there are no sponsors left in the SponsorList, the Lease expires. The Server Lease Object and the Server Object MUST be unmarshaled as per section (section 3.3.5.1) Lease TTL Timer.

Client timed out or unresponsive

Figure 5: Client timed out or unresponsive