3.3.4.3 Register(Overload)

Register(Overload) registers a Sponsor with the Lease Object associated with the Server Object. This implementation of the method includes a second parameter, renewalTime.

 void Register (
     System.Runtime.Remoting.Lifetime.ISponsor sponsor, 
     TimeSpan renewalTime
 );
  

sponsor:  A Proxy to a Server Object that implements the ISponsor interface.

renewalTime: A TimeSpan value that specifies the required TTL for the Server Object.

Return Values: There are no return values for this method.

Exceptions: In addition to the Exceptions common to all Remote Methods in .NET Remoting (as specified in [MS-NRTP] section 3.2.5.1.7.2), if the Sponsor specified in the sponsor argument is a Null Object, an ArgumentNullException (as specified in section 2.2.8) MUST be sent back.

The implementation of the method MUST add the Sponsor to the end of the SponsorList of the associated Lease Data.

The implementation of the method MUST:

  • Create a new Sponsor Info by using the Sponsor instance referenced by the argument sponsor, and the TimeSpan value of the renewalTime argument. The Sponsor Info MUST be inserted in the SponsorList of the associated Lease Data such that the items in the list continue to be sorted in decreasing order of the Sponsor Info's renewalTime.

  • Extend the CurrentLeaseTime of the associated Lease Data with the renewal TimeSpan as specified in the Renew method.