[Zope3-dev] ObjectHub Event names proposal

Godefroid Chapelle gotcha@swing.be
Tue, 30 Jul 2002 19:02:01 +0200


>What would you think of just calling them "HubEvents"?

I took your question '=E0 la lettre' and came to the following :

IHubEvent
|
+--IRegistrationHubEvent
|   |
|   +--IObjectRegisteredHubEvent
|   |
|   +--IObjectUnregisteredHubEvent
|
+--INotificationHubEvent
     |
     +--IObjectAddedHubEvent
     |
     +--IObjectRemovedHubEvent
     |
     +--IObjectMovedHubEvent
     |
     +--IObjectChangedHubEvent

Changes are done but not checked in. All test pass. (Ran 2001 tests in=20
227.287s OK)

I think it is necessary to rename IRuidObjectEvent to IHubEvent and=20
RuidObjectEvent to HubEvent...
but I do not know what I am supposed to do as cvs commands.

I think should be

cvs add IHubEvent.py
cvd remove -f IRuidObjectEvent.py
cvs commit

Can you confirm ?

Further, when trying to document the interfaces (especially when trying to=
=20
differentiate RegistrationHubEvents and NotificationHubEvents), I came to a=
=20
few questions :

- What is the semantic difference between IObjectRegisteredHubEvent and=20
IObjectAddedHubEvent ? IOW why do we need both ?

- What is the semantic difference between IObjectUnregisteredHubEvent and=20
IObjectRemovedHubEvent ? IOW why do we need both ?

I have the feeling that 4 events (registered, unregistered, moved,=20
modified) should be enough and that we do not need the somewhat artificial=
=20
separation I had proposed.

- During sprint, we took the responsibility to register to=20
registration-plugins. This implies that those get the responsibility to=20
unregister. This implies that one of the plugins which would like to=20
unregister could step on the toes of another plugin which wants to keep the=
=20
object registered.
So we need to implement a mechanism where a plugin would emit a=20
IObjectUnregisterQueryEvent to which other plugins should be able to answer=
=20
(how ?) with a "yes, go on, unregister" or a "no, stop, I still need this=20
object".
This leads to the next question, is there a similar mechanism in the=20
current Event service and would it not being needed for other situations ?


--

Godefroid Chapelle

BubbleNet sprl
rue Victor Horta, 18 / 202
1348 Louvain-la-Neuve
Belgium

Tel + 32 (10) 459901
Mob + 32 (477) 363942

TVA 467 093 008
RC Niv 49849