Refactor NioSessionProcessor to abstract class.