Class PriorityEventsRegistrationsMap

java.lang.Object
it.rebirthproject.ufoeb.dto.registrations.maps.interfaces.EventsRegistrationsMap
it.rebirthproject.ufoeb.dto.registrations.maps.PriorityEventsRegistrationsMap

public class PriorityEventsRegistrationsMap extends EventsRegistrationsMap
The map used to add a Registration using its priority. The priority is relative to a precise event and higher priority listeners will be served before. So, listeners that listen for a precise event using priority will be ordered inside the registration list.
example:

  Listener A listen for event E1 with priority 5
  Listener B listen for event E1 with priority 1
  Listener C listen for event E2 with priority 0

  if event E1 is posted to the bus then execution will be

  - First to be served is A with event E1 (since 5 is greater than 1)
  - Second to be server is B with event E1
  - Listener C does not receive anything because it is listening to E2

 
See Also: