Roles

[Previous] [Next]

The roles and functions of the Event Service design pattern are as follows:

  • IEventChannel An interface that serves as the intermediary between publishers and subscribers of events.
  • EventChannelImpl A concrete implementation class of IEventChannel. The process of event flow is defined in the EventChannelImpl class. For example, the EventChannelImpl class dictates whether events are synchronous or asynchronous, determines the priority of delivery, and determines the relationships between events, publishers, and subscribers. A common implementation might include a single publisher submitting events but many subscribers responding to the arrival of events in the event channel.
  • IPublisher An interface that defines methods for publishing events on an EventChannelImpl instance.
  • PublisherImpl A concrete implementation class of IPublisher. Because the EventChannelImpl class determines how published events are handled, it is typical for the PublisherImpl class to have an intimate relationship with the event channel. Typically, the event channel programmer would also develop the publisher.
  • ISubscriber An interface that defines unique events (method signatures).
  • SubscriberImpl A concrete class that implements the ISubscriber interface. This class represents a unique class of subscriber. Implementing the ISubscriber interface and registering an instance of this class with the event channel makes this class responsive to events published on the event channel. Refer to the "Implementation" section of this chapter for further details.


Microsoft Visual Basic Design Patterns
Microsoft Visual Basic Design Patterns (Microsoft Professional Series)
ISBN: B00006L567
EAN: N/A
Year: 2000
Pages: 148

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net