added a new protected virtual method "OnStarted()" to replace "OnStartup()"