class MessageEventService {

  public void fireEvent( final Message event ) throws MessageEventFireEventException {
    if ( event != null ) {
      // if at least 1 eventFilter contains a group of handlers for the given event type
      if ( containsHandlerFor( event ) ) {
        // retrieve the handler list concerned by the given event
        final Collection<MessageEventHandler> handlers = getHandlersFor( event );

        if ( handlers != null && handlers.size() > 0 ) {
          MessageEventFireEventException messageEventFireEventException = null;
          for ( final MessageEventHandler handler : handlers ) {
            // for each handler, I check if it's interested or not by the given event
            try {
              handler.execute( event );
            } catch ( final Exception e ) {
              if ( messageEventFireEventException == null ) {
                messageEventFireEventException =
                  new MessageEventFireEventException( "Unable to execute some handler." );
              }
              messageEventFireEventException.addHandlerException( e );
              // TODO: log exception
            }
          }
          if ( messageEventFireEventException != null ) {
            throw messageEventFireEventException;
          }
        }
      }
    } else {
      //TODO: log exception
      throw new MessageEventFireEventException( "Unable to fire a null event" );
    }
  }

  public  MessageEventService();

}