add setGracefulStopHandler