public void whenTerminated() { status = Status.TERMINATED; if (listener != null) { listener.handleTerminateEvent(); } }