void () { boolean gracefulTerminationAttempted = shouldKillProcessSoftly() && canDestroyProcessGracefully() && destroyProcessGracefully(); if (!gracefulTerminationAttempted) { // execute default process destroy super.doDestroyProcess(); } }