[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces/services - event.py:1.3 hub.py:1.3 service.py:1.3

Steve Alexander steve@cat-box.net
Mon, 30 Dec 2002 09:03:46 -0500


Update of /cvs-repository/Zope3/src/zope/app/interfaces/services
In directory cvs.zope.org:/tmp/cvs-serv23914/src/zope/app/interfaces/services

Modified Files:
	event.py hub.py service.py 
Log Message:
Large refactoring of the event service.


=== Zope3/src/zope/app/interfaces/services/event.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/interfaces/services/event.py:1.2	Wed Dec 25 09:13:02 2002
+++ Zope3/src/zope/app/interfaces/services/event.py	Mon Dec 30 09:03:14 2002
@@ -16,14 +16,19 @@
 Revision information:
 $Id$
 """
-from zope.interface import Attribute
-from zope.interfaces.event import IIndirectSubscriber
 
-class IPathSubscriber(IIndirectSubscriber):
+from zope.interface import Interface
+from zope.app.interfaces.event import ISubscribable, ISubscriber, IPublisher
 
-    def __init__(wrapped_subscriber):
-        """creates new PathSubscriber for the given wrapped_subscriber"""
+class ISubscriptionService(ISubscribable):
+    """A Subscribable that implements the Subscription service."""
 
-    subscriber_path = Attribute(
-        """the slash-delineated physical path to the subscriber"""
-        )
+class IEventChannel(ISubscribable, ISubscriber):
+    """Interface for objects which distribute events to subscribers. """
+
+class IEventService(ISubscriptionService, IPublisher):
+    """Local event service implementation.
+    
+    Offers the Events and Subscription services.
+    """
+    


=== Zope3/src/zope/app/interfaces/services/hub.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/interfaces/services/hub.py:1.2	Wed Dec 25 09:13:02 2002
+++ Zope3/src/zope/app/interfaces/services/hub.py	Mon Dec 30 09:03:14 2002
@@ -18,8 +18,8 @@
 
 from zope.interface import Attribute
 
-from zope.interfaces.event import IEventChannel
-from zope.interfaces.event import IEvent
+from zope.app.interfaces.services.event import IEventChannel
+from zope.app.interfaces.event import IEvent
 
 
 class ObjectHubError(Exception):


=== Zope3/src/zope/app/interfaces/services/service.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/interfaces/services/service.py:1.2	Wed Dec 25 09:13:02 2002
+++ Zope3/src/zope/app/interfaces/services/service.py	Mon Dec 30 09:03:14 2002
@@ -18,7 +18,6 @@
 __metaclass__ = type
 
 from zope.publisher.interfaces.browser import IBrowserPresentation
-from zope.interface import Interface
 from zope.app.component.interfacefield import InterfaceField
 from zope.schema import BytesLine
 from zope.component.interfaces import IPresentation
@@ -29,14 +28,10 @@
 from zope.component.interfaces import IServiceService
 
 from zope.app.interfaces.services.configuration \
-     import INamedComponentConfiguration
-
-from zope.app.interfaces.services.configuration \
-     import INameComponentConfigurable
+     import INamedComponentConfiguration, INameComponentConfigurable
 
 class IComponentManager(Interface):
 
-
     def queryComponent(type=None, filter=None, all=0):
         """Return all components that match the given type and filter
 
@@ -86,20 +81,19 @@
 class IBindingAware(Interface):
 
     def bound(name):
-        """Inform a service components that it's providing a service
+        """Inform a service component that it is providing a service
 
         Called when an immediately-containing service manager binds
         this object to perform the named service.
         """
 
     def unbound(name):
-        """Inform a service components that it's no longer providing a service
+        """Inform a service component that it is no longer providing a service
 
         Called when an immediately-containing service manager unbinds
         this object from performing the named service.
         """
 
-from zope.interface import Attribute
 
 class IServiceManager(IServiceService, IComponentManager,
                       INameComponentConfigurable):