Adding server shutdown notification mechanism

Signed-off-by: Jayanga Dissanayake <jsdjayanga@yahoo.com>