@Override
    public final void lifecycleEventOccurred(RunnableEntityLifecycleEvent runnableEntity) {
        try {
            switch (runnableEntity.getState()) {
                case INITIALIZING:
                    init();
                    break;
                case STARTING:
                    start();
                    break;
                case STOPPING:
                    stop();
                    break;
                case PAUSING:
                    pause();
                    break;
                case RESUMING:
                    resume();
                    break;
                case DESTROYING:
                    destroy();
                    break;
            }
        } catch (RunnableEntityException e) {
            LOGGER.log(Level.SEVERE, String.format("Error while %s %s '%s'.", runnableEntity.getState(), getType(), getName()), e);
        }
    }