Extension methods to get the handlers for a contract.