Java client for rest api