Package org.appng.api.messaging
Interface EventHandler<E extends Event>
-
- Type Parameters:
E
- the type of theEvent
public interface EventHandler<E extends Event>
An event-handler is responsible for handling events of a certain type.- Author:
- , Matthias Müller
- See Also:
EventRegistry
,Receiver.setDefaultHandler(EventHandler)
,Receiver.registerHandler(EventHandler)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Class<E>
getEventClass()
Returns the type of theEvent
this handler reacts tovoid
onEvent(E event, Environment environment, Site site)
Handles the givenEvent
, usually by calling it'sperform
-method.
-
-
-
Method Detail
-
onEvent
void onEvent(E event, Environment environment, Site site) throws InvalidConfigurationException, BusinessException
Handles the givenEvent
, usually by calling it'sperform
-method.- Parameters:
event
- theEvent
to be handledenvironment
- theEnvironment
to usesite
- theSite
where theEvent
occurred- Throws:
InvalidConfigurationException
- if there's a configuration errorBusinessException
- if an error occurs while performing the event- See Also:
Event.perform(Environment, Site)
-
-