org.appng.api.messaging

## Interface EventHandler<E extends Event>

- Type Parameters:
    `E` - the type of the `Event`

      public interface EventHandler<E extends Event>

  An event-handler is responsible for handling events of a certain type.
  Author:
    @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 and Description
    --- | ---
    `Class<E>` | `getEventClass()` Returns the type of the `Event` this handler reacts to
    `void` | `onEvent(E event, Environment environment, Site site)` Handles the given `Event`, usually by calling it's `perform`-method.

- - ### Method Detail

    - #### onEvent

          void onEvent(E event,
                       Environment environment,
                       Site site)
                throws InvalidConfigurationException,
                       BusinessException

      Handles the given `Event`, usually by calling it's `perform`-method.
      Parameters:
        `event` - the `Event` to be handled
        `environment` - the `Environment` to use
        `site` - the `Site` where the `Event` occurred
      Throws:
        `InvalidConfigurationException` - if there's a configuration error
        `BusinessException` - if an error occurs while performing the event
      See Also:
        `Event.perform(Environment, Site)`

    - #### getEventClass

          Class<E> getEventClass()

      Returns the type of the `Event` this handler reacts to
      Returns:
        the type of the `Event` this handler reacts to

Copyright © 2011–2023 aiticon GmbH. All rights reserved.