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); } }