A Java library to access Connections in a reactive manner. Is primarily created to work with Play Framework, but can work in any context.
Read in or set up properties, like this:
Properties prop = new Properties();
prop.setProperty("connections.server.host", "https://connections.myserver.com");
prop.setProperty("connections.server.username", "username");
prop.setProperty("connections.server.password", "password");
Create an instence of the ConnectionsClient, select the service, and do an operation on it.
ConnectionsClient client = ConnectionsClient.getInstance(prop);
Promise<List<Blog>> blogPromise = client.blogs().myBlogs();
List<Blog> blogs = blogPromise.get();
To test the connection to server, you need to supply the system with your credentials.
- Create a new file
src/test/resources/conf/secret.conf
- Add this configuration to the file:
connections.server.host="https://connections.myserver.com"
connections.server.username="username"
connections.server.password="password"
- Run the ConnectionsTest.testConnection unittest.