Class HTTPStreams
java.lang.Object
com.teracloud.streams.topology.inet.HTTPStreams
Access to data in web servers or services using HTTP.
- See Also:
-
com.teracloud.streams.inet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TStream<com.ibm.json.java.JSONObject>getJSON(TopologyElement te, String url, long period, TimeUnit unit) Periodically poll a web service using HTTPGETforapplication/jsondata.
-
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 HTTPGETforapplication/jsondata. Declares a source stream that will contain a single tuple for each successfulGET. The tuple is the complete JSON (application/jsoncontent) returned by the request.- Parameters:
te- Topology the source stream will be contained in.url- URL to poll.period- Polling period.unit- Unit forperiod.- Returns:
- Stream that will contain the JSON tuples from periodic HTTP
GETrequests.
-