Rio Project 4.2 API Documentation
org.rioproject.event
Class RoundRobinEventHandler
java.lang.Object
org.rioproject.event.EventHandler
org.rioproject.event.RoundRobinEventHandler
public class RoundRobinEventHandler
- extends EventHandler
The RoundRobinEventHandler provides an implementation of an
EventHandler which supports the notification of events using
round-robin semantic. This event handler will send notification of an event
to a valid remote event listener (one that has an active lease) is the
collection of event registrants. For each subsequent notification the next
listener in the list will be notified.
If remote event listeners are removed from the collection of event
registrants and the notification ordinal references the removed registrant,
then the notification ordinal will reference the next registrant in the
collection.
The sequence number for events is incremented after each subsequent fire
invocation.
- Author:
- Dennis Reedy
| Fields inherited from class org.rioproject.event.EventHandler |
descriptor, ektime, landlord, resourceMgr, RESPONSE_WATCH, responseWatch, sendTime, sent, sequenceNumber, sktime, step, t0, t1, tmp, watchRegistry |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RoundRobinEventHandler
public RoundRobinEventHandler(EventDescriptor descriptor)
throws Exception
- Construct a RoundRobinEventHandler with an EventDescriptor and default
lease maximum and time allocation
- Parameters:
descriptor - The EventDescriptor
- Throws:
Exception - If a landlord lease manager cannot be created
RoundRobinEventHandler
public RoundRobinEventHandler(EventDescriptor descriptor,
Configuration config)
throws Exception
- Construct a RoundRobinEventHandler with an EventDescriptor and a
Configuration object
- Parameters:
descriptor - The EventDescriptorconfig - The configuration object
- Throws:
Exception - If a landlord lease manager cannot be created
fire
public void fire(RemoteServiceEvent event)
throws NoEventConsumerException
- Implement the
fire method from EventHandler.
This method will get the next available listener and send it an event. If
there are no event registrants a NoEventConsumerException is thrown
- Specified by:
fire in class EventHandler
- Parameters:
event - The event to send
- Throws:
NoEventConsumerException - is there are no event registrants to
send the event to
Copyright © 2006-2011 Rio Project. All Rights Reserved.