Refactor for better API design in AbstractAdapter.