Refactor connectionHandler as member