Java Event Manager

Key Information

Register
Submit
The challenge is finished.

Challenge Overview

This component is intended to be used as an event-propagation mechanism between JBJI Task implementations, but it actually provides a generic event propagation capability using, so that it can be used with any type of objects.

The design is very simple. Component defines an interface for event listeners (EventListener) and a class (EventManager) which manages registering and un-registering event listeners as well as raising events.

So, a class which wants to be an event listener or event producer, should get an instance of EventListener (in JBJI, it should be a common instance, configured via Spring). Event producers will then call EventManager.raiseEvent() method. Event listeners should also implement the EventListener interface and register themselves to events via EventManager.addListeners() method (or, an event listener can be registered to events by external code, in that case event listener obviously don’t need to be aware of EventManager instance).

The events are typed, which means that each event has a type assigned to it and event listeners are registered for each type separately.

This component is intended to be used as an event-propagation mechanism between JBJI Task implementations, but it actually provides a generic event propagation capability using, so that it can be used with any type of objects.

The design is very simple. Component defines an interface for event listeners (EventListener) and a class (EventManager) which manages registering and un-registering event listeners as well as raising events.

So, a class which wants to be an event listener or event producer, should get an instance of EventListener (in JBJI, it should be a common instance, configured via Spring). Event producers will then call EventManager.raiseEvent() method. Event listeners should also implement the EventListener interface and register themselves to events via EventManager.addListeners() method (or, an event listener can be registered to events by external code, in that case event listener obviously don’t need to be aware of EventManager instance).

The events are typed, which means that each event has a type assigned to it and event listeners are registered for each type separately.



Final Submission Guidelines

N/A

ELIGIBLE EVENTS:

2013 TopCoder(R) Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30032720