I've been looking at the use of Lease
and specifically their expiration. I am a little confused about how to reflect this expiration in a client side application. This is pretty trivial using some kind of polling mechanism - but after seeing the implementation of .notify
on objects being written to the space, I was wondering if there is something better.
Is there a way to be notified of a Lease expiration? Or is there some sort of accepted solution on how to poll for these expirations?
I have read several sources (e.g. http://www.javacoffeebreak.com/books/extracts/jini/Lease.html), and they mention ways to be notified of this expiration but I cannot see any examples. JavaDocs hint that LeaseRenewalManager
might be of use, but my initial tests haven't really given me anything.