+act #3532: Add ask support for Java API
(cherry picked from commit 5e3dcaa)
Merge pull request #1667 from drewhk/wip-3532-backport-drewhk

+act #3532: Add ask support for Java API (backport)