/**
  * Submit the event to the queue for handling.
  *
  * @param event
  */
 void submit(final EventHandler event) {
   // If there is a listener for this type, make sure we call the before
   // and after process methods.
   EventHandlerListener listener = this.eventHandlerListeners.get(event.getEventType());
   if (listener != null) {
     event.setListener(listener);
   }
   this.threadPoolExecutor.execute(event);
 }
 public void submit(final EventHandler eh) {
   Executor executor = getExecutor(getExecutorServiceType(eh.getEventType()));
   if (executor == null) {
     // This happens only when events are submitted after shutdown() was
     // called, so dropping them should be "ok" since it means we're
     // shutting down.
     LOG.error(
         "Cannot submit ["
             + eh
             + "] because the executor is missing."
             + " Is this process shutting down?");
   } else {
     executor.submit(eh);
   }
 }