There are two samples for java.
It is using httpclient and it is a web application, you can start the application and access it through the browser.
The other one is using jersey client and it is a java application
For detailed usage of these two samples, please refer to Foglight REST APIs Introduction - Java and Python Sample Code.