One of the libraries provided by the SDK for out-of-process extensions is the Java ReST API wrapper library. It enables you to work with the Alfresco ReST API(see REST API Guide) from a Java client with standard Java classes. There is no need to parse JSON or create HTTP requests.
To set up a project with the Java ReST API library follow the instructions on creating a Java REST API extension project in Software Development Kits (SDK).