public class HTTPStreams
extends java.lang.Object
Constructor and Description |
---|
HTTPStreams() |
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. |
public static TStream<com.ibm.json.java.JSONObject> getJSON(TopologyElement te, java.lang.String url, long period, java.util.concurrent.TimeUnit unit)
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.te
- Topology the source stream will be contained in.url
- URL to poll.period
- Polling period.unit
- Unit for period
.GET
requests.