Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

Lease_Impl Class Reference

#include <Lease_Impl.h>

List of all members.

Public Member Functions

 Lease_Impl (TimeBase::TimeT expiration_time, LookupService_ptr lookup_service, const CosNaming::Name &name, LeaseHolder_ptr lease_holder)
void renew (TimeBase::TimeT duration) throw (InvalidDuration)
TimeBase::TimeT get_remaining_time ()
void expired ()
LeaseHolder_ptr get_lease_holder ()
CosNaming::Name * get_name ()


Detailed Description

Lease_Impl is the class that implements the "Lease" object. It shows shows how a lease could be implemented. The lease will be created by the lookup service. It maintains the association between the name used to register and the lease holder.

Author:
Michael Kircher

Prashant Jain

Version:
1.0


Constructor & Destructor Documentation

Lease_Impl::Lease_Impl TimeBase::TimeT  expiration_time,
LookupService_ptr  lookup_service,
const CosNaming::Name &  name,
LeaseHolder_ptr  lease_holder
[inline]
 

Constructor

Parameters:
expiration_time When is the lease expected to expire.
lookup_service The lookup service where the remote object is registered with.
name The name which has been used during the registration.
lease_holder The lease holder object to be notified when the lease expires.


Member Function Documentation

void Lease_Impl::expired  )  [inline]
 

Invalidates the lease.

LeaseHolder_ptr Lease_Impl::get_lease_holder  )  [inline]
 

Returns the lease holder

Returns:
The lease holder.

CosNaming::Name* Lease_Impl::get_name  )  [inline]
 

Returns the name of the remote object, as registered.

Returns:
Name Name of the remote object.

TimeBase::TimeT Lease_Impl::get_remaining_time  )  [inline]
 

Query for the remaning time of the lease until expiration.

Returns:
TimeT Time until expiration.

void Lease_Impl::renew TimeBase::TimeT  duration  )  throw (InvalidDuration) [inline]
 

Renew the lease for the given time.

Parameters:
duration The duration of the lease.
Exceptions:
InvalidDuration The duration was not acceptable.


The documentation for this class was generated from the following file:

These pages document the source code of the patterns Lookup, Eager Acquisition, and Leasing.

Copyright 2004 John Wiley and Sons. All Rights Reserved.