code: public void triggerEvents(Object result,
  	                          int responseCode,
  	                          RouteDefinition definition,
  	                          RoutingContext context,
  	                          InjectionProvider injectionProvider) throws Throwable {
  
  		if (definition.getEvents() == null) {
  			return;
  		}
  
  
  		for (Event event : definition.getEvents()) {
  			// status code match OR all
  			if (event.response() == responseCode ||
  			    (event.response() == Event.DEFAULT_EVENT_STATUS && responseCode >= 200 && responseCode < 300) ||
  			    (event.response() == Event.DEFAULT_EVENT_STATUS && result instanceof Throwable)) {
  
  				// type fit
  				boolean trigger = shouldTriggerEvent(event, result);
  
  				if (trigger) {
  					try {
  						Class<? extends RestEvent> processor = event.value();
  						RestEvent instance = (RestEvent) ClassFactory.newInstanceOf(processor, injectionProvider, context);
  
  						log.debug("Triggering event: " + event.value());
  						instance.execute(result, context);
  					}
  					catch (ClassFactoryException | ContextException e) {
  						log.error("Failed to provide RestEvent for: " + definition + " ", e);
  					}
  				}
  			}
  		}
  	}
docs: Matches events to result / response
  
  @param result       of method either returned class or exception
  @param responseCode produced by writer
  @param definition route definition
  @param context routing context
  @param injectionProvider injection provider to instantiate event processor