Apply the change of NioSession interface.
Make necessary change for forest refactoring.