pass RestServer object to lifecycle callback methods