Java client endpoint example