Running the Java Examples

Updated on Friday, 19 October, 2012 - 17:14

Download the Java Client Library

Download a copy of the Java library from our GitHub Java page. There are two ways to do this.

  • In Github, click Download and extract the archive manually
  • Use git from the command line:

    git clone https://www.github.com/datasift/datasift-java.git

Learn to Use the Java Client Library

These steps test the REST API (api.datasift.com) and then the streaming API (stream.datasift.com).

Endpoint Supported?
https://api.datasift.com/validate Yes
https://api.datasift.com/compile Yes
https://api.datasift.com/stream Yes
https://api.datasift.com/dpu Yes
https://api.datasift.com/usage Yes
https://stream.datasift.com Yes
ws://websocket.datasift.com No *

* Note that there are two endpoints for the streaming API:

  • stream.datasift.com for HTTP access
  • websocket.datasift.com for WS access

The DataSift client libraries use HTTP streaming by default for most languages. There is no technical restriction on hitting the websockets API endpoint. The choice of protocol makes no difference to the data objects that are returned.