Browse Prior Art Database

Timermanager for Object-Oriented Systems Requiring Timers

IP.com Disclosure Number: IPCOM000110952D
Original Publication Date: 1994-Jan-01
Included in the Prior Art Database: 2005-Mar-26
Document File: 8 page(s) / 190K

Publishing Venue

IBM

Related People

Keane, PJ: AUTHOR [+2]

Abstract

Applications requiring timers need a method of simplifying the use of timers and reducing system resources required to manage timers. There is also a requirement to allow objects to have active timers even if the object itself is not active.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 22% of the total text.

Timermanager for Object-Oriented Systems Requiring Timers

      Applications requiring timers need a method of simplifying the
use of timers and reducing system resources required to manage
timers.  There is also a requirement to allow objects to have active
timers even if the object itself is not active.

      This article describes an object-oriented approach to managing
timers in an object-oriented application which requires the use of
timers.  The examples in this disclosure have been implemented in
Smalltalk/V* but the approach described could be implemented using
any object-oriented development tool.

      In an operating system like OS/2**, an application requiring a
timer registers a timer with the system.  The timer registration
requires a window to which the system can send the timer message when
the timer event occurs.  In an object-oriented environment the object
needing the timer service does not have a window to which the timer
event can be sent by the system.  Creating a window for each needed
timer is a waste of system resources.  Also, the object requiring the
timer then has to translate the timer event into a message more
applicable to the application.  If an object has several timers set
at once this could be complex code that would have to be duplicated
among all objects using timers.

      There is a need for an object which can manage timers for all
of the objects in an application.  An example of this type of
application would be a Calendar system which notifies the user of
reminders for specific events.  Another example would be a mail
system which needs to periodically check for new mail.  The
TimerManager should allow for the registration of timer events by
objects requiring the service.  It should also be capable of
converting the system timer events into messages that are meaningful
to the object requiring the service.  For example, instead of a mail
system receiving a timer message, it should receive a check for new
mail message.

     The interface for a timer manager consists of the following
methods:

          1.  addTimerFor: anObject

             date: aDate

             time: aTime

             notifyMessage: aSymbol

             messageParameter: aParameter

      This message registers a timer which should occur at a specific
date and time.  It will only occur once.  anObject specifies the
object to be notified when the date and time are reached.  This
object is probably the object requiring the service, but this
implementation allows an object to register a timer event for another
object.  aDate is the date when the timer event should occur.  aTime
is the time when the timer event should occur.  aSymbol is the
message that should be sent to anObject when the timer event occurs.
aParameter is the parameter that should be sent with the message.
This would be useful if the application needs to know some
inf...