Embodiments of the present invention provide a system and method for use
in a computing environment to manage event registration and create and
fire events. The system includes a memory structure wherein event types
are associated with event identifications (ID). The system further
includes a module that is operable to retrieve an event identification
(ID) from the memory structure when the event's ID is requested by either
an event-consumer or an event-producer and a module to register an event
type if the event type is not found in the memory structure. Additional
modules are operable to create event objects, to attach an event-consumer
to and detach from an event type, and to fire an event object. According
to the method, when the system receives a request for an event's ID, it
will search the memory structure. If the event type is registered within
the memory structure, the system will return the event ID to the
requesting object. If the event type is not registered within the memory
structure, the system will register the event type thereby associating an
event ID with the event type and return the event ID to the requesting
object. When the system receives a request to create an event type, it
will create an appropriate event type. Conversely, when requested, the
system will delete an event type. In addition, the system will attach or
detach an event-consumer from an event type when such a request is
received. Finally, the system will notify event-consumers that an event
object of the type they registered for has fired.