bind dispatch hooks for rpc
private after protected
use private field instead of method
Merge pull request #526 from rdwallis/fixdh

bind dispatch hooks for rpc