public class IotStreams extends java.lang.Object
com.ibm.streamsx.iot
toolkit. In order to interact with IoT Platform
the Streams application
com.ibm.streamsx.iot.watson.apps::IotPlatform
must be running.Modifier and Type | Method and Description |
---|---|
static void |
commandPublish(com.ibm.streamsx.topology.TStream<DeviceCmd> commandStream) |
static com.ibm.streamsx.topology.TStream<DeviceCmd> |
commandsSubscribe(com.ibm.streamsx.topology.TopologyElement te,
java.lang.String... cmdId)
Subscribe to commands as
DeviceCmd instances. |
static com.ibm.streamsx.topology.TStream<DeviceCmd> |
commandsSubscribe(com.ibm.streamsx.topology.TopologyElement te,
java.lang.String[] typeIds,
java.lang.String... cmdId) |
static com.ibm.streamsx.topology.TStream<DeviceEvent> |
eventsSubscribe(com.ibm.streamsx.topology.TopologyElement te,
java.lang.String... eventId)
Subscribe to events as
DeviceEvent instances. |
static com.ibm.streamsx.topology.TStream<DeviceEvent> |
eventsSubscribe(com.ibm.streamsx.topology.TopologyElement te,
java.lang.String[] typeIds,
java.lang.String... eventId)
Subscribe to events as
DeviceEvent instances. |
static com.ibm.streamsx.topology.TStream<DeviceStatus> |
statusesSubscribe(com.ibm.streamsx.topology.TopologyElement te,
java.lang.String... typeId) |
public static com.ibm.streamsx.topology.TStream<DeviceEvent> eventsSubscribe(com.ibm.streamsx.topology.TopologyElement te, java.lang.String... eventId)
DeviceEvent
instances.
Subscribes to all device events with event identifiers listed in
eventId
. If eventId
is empty or passed as a null
array then all device events are subscribed to.
To receive device events the Streams application
com.ibm.streamsx.iot.watson.apps::IotPlatform
must be
running in the same Streams instance.te
- Topology to create this source in.eventId
- Event identifiers to subscribe to. If none are provided then
all event identifiers are subscribed to.public static com.ibm.streamsx.topology.TStream<DeviceEvent> eventsSubscribe(com.ibm.streamsx.topology.TopologyElement te, java.lang.String[] typeIds, java.lang.String... eventId)
DeviceEvent
instances.
Subscribes to all device events with:
typeIds
. If
typeIds
is empty or passed as a null
array reference
then no filtering against type identifier is applied.eventId
. If
eventId
is empty or passed as a null
array reference
then no filtering against event identifier is applied.com.ibm.streamsx.iot.watson.apps::IotPlatform
must be
running in the same Streams instance.te
- Topology to create this source in.typeIds
- Type identifers to subscribe to. If this is empty or null then
all type identifiers are subscribed to.eventId
- Event identifiers to subscribe to. If none are provided then
all event identifiers are subscribed to.public static com.ibm.streamsx.topology.TStream<DeviceCmd> commandsSubscribe(com.ibm.streamsx.topology.TopologyElement te, java.lang.String... cmdId)
DeviceCmd
instances.
Subscribes to all device commands with commands identifiers listed in
cmdId
. If cmdId
is empty or passed as a null
array then all device commands are subscribed to.
To receive device events the Streams application
com.ibm.streamsx.iot.watson.apps::IotPlatform
must be
running in the same Streams instance.te
- Topology to create this source in.cmdId
- Command identifiers to subscribe to.public static com.ibm.streamsx.topology.TStream<DeviceCmd> commandsSubscribe(com.ibm.streamsx.topology.TopologyElement te, java.lang.String[] typeIds, java.lang.String... cmdId)
public static void commandPublish(com.ibm.streamsx.topology.TStream<DeviceCmd> commandStream)
public static com.ibm.streamsx.topology.TStream<DeviceStatus> statusesSubscribe(com.ibm.streamsx.topology.TopologyElement te, java.lang.String... typeId)