Simple proxy impemented in Java