The EventHandler is an abstract class that handles the basic event plumbing.
Container class for event registration objects that are created and behave as the resource that is being leased and controlled by the ServiceResource
The BasicEventConsumer is a helper class that manages the discovery of
Utility class to create
The EventNotificationAdapter defines the essentials for an event client to transform a remote event notification to a JMX notification.
Provides classes and interfaces which enable support for distributed events. The distributed event model found within Rio extends Jini™ events providing an easier to use model with increased semantics. The Rio event model makes it easy to implement Jini events. The Rio event model provides a straightforward producer-consumer model with built in leasing.
The Rio Event Model provides the basis to craft a loosely coupled architecture that allows event producers to advertise event attributes, and event clients to discover event producers that produce the event(s) they are interested in.
This capability enables a peer-to-peer semantic allowing the exchange of event objects that indicate a change in state in the distributed system. Event consumers construct leased event registrations and are notified of the change in state by event producers.
By using a loosely coupled architecture, it becomes easier to adapt
to changes. Interdependencies found in tightly coupled RPC oriented
environments are removed with loosely coupled architectures. We can
replace (or add) impementations at either end (event producer or event
consumer) without altering existing components. By using a loosely
coupled architecture we are able to more easily adapt to an unforeseen
forward fit, replace defective component(s) online and scale a system
dynamically. Overall these capabilities greatly minimize total
development risk and cost.
The following event mechanisms are discussed below:
EventDescriptor provides a simple semantic
discovering event producers of a specific kind of event. A
EventDescriptor is an attribute, part of the
of an Event Producer that is producing
an event object described by a
EventDescriptor’s may also be used for matching events for consumption. This will be explained in the Event Consumer section below.
Any service can be an Event Producer, that is. a service that has a zero-to-many dependency between objects so that when its state changes all its dependents are notified. This semantic is also known as the observer-observable and/or publish-subscribe pattern.
Rio adds to this capability by providing the notion that event producers have the flexibility to choose a notification policy, that is to say. event producers dictate event distribution mechanisms.Event distribution mechanisms are based on an abstract EventHandler framework allowing the creation of multiple event dispatch mechanisms.
For each subsequent notification the next event registrant in the list will be notified. If event registrants are removed from the collection of event registrants and the notification ordinal references the removed event registrant, then the notification ordinal will reference the next event registrant in the collection
EventConsumerinstances. The EventConsumer framework provides helper classes that manage the discovery of EventProducer instances that provide support for user defined events.
EventConsumerinterface, which extends the Jini
BasicEventConsumer, used as a local utility, manages the event registration and leasing of event registrations on behalf of a client. In this manner, clients wishing to easily register (subscribe) for the notification of an event in the distributed system need not be overly concerned with the underlying semantics and management of event registrations, leases and events
||The exporter used to export the BasicEventConsumer as a remote event listener. A new exporter is obtained every time a BasicEventConsumer needs to export itself|
||Preparer for the leases returned when a BasicEventConsumer registers with the event mechanism of any of the services|
||The length (in milliseconds) the EventRegistration lease duration should be. This value should not be too small as it will result in frequent network traffic|
Copyright © 2007–2017 Rio Project. All rights reserved.