Glydar/Glydar — pull request #28 by aumgn (2013-08-20 19:22:23+00:00)
Title: Events

This is not ready to merge, but ready to be reviewed.

This PR consists of independent ideas/concepts which can be picked separately.

### EventPriority vs EventOrder

EventPriority is misleading because new developers tend to think of priority as the priority in the call order of events rather than the priority on event modifications. EventOrder does not have this ambiguity.

### EventPhase

The idea is to separate priority/order from Monitor.
This will allow two things :
- Add a way to enforce immutability of Event for Monitor handlers.
- Add a third step After/PostMonitor which could be called after the event has been handled by the server.

### EventSupport

This class allows for fast firing of event by providing a simple fast #getEventSupport() instance method in the superclass Event. This is a bit more complicated to implement for Event class, but the performance should worth it.

### DefaultEventManager

Contrary to the old implementation, this one does not assume that the Annotation/reflect.Method system is the way to go in order to implement an Event handler but rather use a plain old Java interface EventExecutor which can be directly used by plugin which are more concerned by performance.
The annotation API is still present but only acts as a facade to register an EventExecutor.