Rio Project 5.6.6 API Reference Documentation

Skip navigation links

Package org.rioproject.impl.event

Provides classes and interfaces which enable support for distributed events.

See: Description

Package org.rioproject.impl.event Description

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:

Event Descriptors
A EventDescriptor provides a simple semantic for specifying and discovering event producers of a specific kind of event. A EventDescriptor is an attribute, part of the description of an Event Producer that is producing an event object described by a EventDescriptor

Event objects may be simple to just indicate that an event has occurred or be rich containing other information about the event. For example, a snapshot of an object's state may be included with the event as it is delivered.

EventDescriptor’s may also be used for matching events for consumption. This will be explained in the Event Consumer section below. 

Event Producers
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.

Event Consumer
The recipients of an EventProducer’s event object are EventConsumer instances. The EventConsumer framework provides helper classes that manage the discovery of EventProducer instances that provide support for user defined events.

Configuring the Event Consumer
The BasicEventConsumer (and it's specializations) support the following configuration entries; where the configuration entry name are associated with the component name org.rioproject.event


Skip navigation links
Copyright © Rio Project.

Copyright © 2007–2018 Rio Project. All rights reserved.