PassThroughCode refactoring and create PassThrough Core and API for enhace reusability

extract common code to a private method and call it from both public methods for shutdownIOReactor