com.ibm.streamsx.topology.inet

Class HTTPStreams

  • java.lang.Object
    • com.ibm.streamsx.topology.inet.HTTPStreams


  • public class HTTPStreams
    extends java.lang.Object
    Access to data in web servers or services using HTTP.
    See Also:
    com.ibm.streamsx.inet
    • Constructor Summary

      Constructors 
      Constructor and Description
      HTTPStreams() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static TStream<com.ibm.json.java.JSONObject> getJSON(TopologyElement te, java.lang.String url, long period, java.util.concurrent.TimeUnit unit)
      Periodically poll a web service using HTTP GET for application/json data.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HTTPStreams

        public HTTPStreams()
    • Method Detail

      • getJSON

        public static TStream<com.ibm.json.java.JSONObject> getJSON(TopologyElement te,
                                                                    java.lang.String url,
                                                                    long period,
                                                                    java.util.concurrent.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.
streamsx.topology 2.1 @ IBMStreams GitHub