Class HTTPStreams

java.lang.Object
com.teracloud.streams.topology.inet.HTTPStreams

public class HTTPStreams extends Object
Access to data in web servers or services using HTTP.
See Also:
  • com.teracloud.streams.inet
  • Constructor Details

    • HTTPStreams

      public HTTPStreams()
  • Method Details

    • getJSON

      public static TStream<com.ibm.json.java.JSONObject> getJSON(TopologyElement te, String url, long period, TimeUnit unit)
      Periodically poll a web service using HTTP GET for application/json data. Declares a source stream that will contain a single tuple for each successful GET. The tuple is the complete JSON (application/json content) returned by the request.
      Parameters:
      te - Topology the source stream will be contained in.
      url - URL to poll.
      period - Polling period.
      unit - Unit for period.
      Returns:
      Stream that will contain the JSON tuples from periodic HTTP GET requests.