public interface ChannelApi
| Modifier and Type | Method and Description |
|---|---|
rx.Observable<DataChannel> |
create(ChannelDefinition mqttDefinition)
Creates an MQTT channel for a device specified with
ChannelDefinition.deviceId
Used in RelayrJavaSdk.getWebSocketClient() to create channels and subscribe to device readings. |
rx.Observable<PublishChannel> |
createForDevice(ChannelDefinition mqttDefinition,
java.lang.String deviceId)
Create channel to publish device data to.
|
rx.Observable<java.lang.Void> |
delete(java.lang.String channelId)
Deletes an MQTT channel
|
rx.Observable<ExistingChannel> |
getChannels(java.lang.String deviceId)
Returns existing MQTT channels for specified device.
|
@POST(value="/channels") rx.Observable<DataChannel> create(@Body ChannelDefinition mqttDefinition)
ChannelDefinition.deviceId
Used in RelayrJavaSdk.getWebSocketClient() to create channels and subscribe to device readings.mqttDefinition - - requires ChannelDefinition with ChannelTransport.MQTTDataChannel with created MQTT channel credentials, Observer.onError(Throwable) otherwise@DELETE(value="/channels/{channelId}")
rx.Observable<java.lang.Void> delete(@Path(value="channelId")
java.lang.String channelId)
channelId - existing channel IDObservable if channel is deleted, Observer.onError(Throwable) otherwise@GET(value="/devices/{deviceId}/channels")
rx.Observable<ExistingChannel> getChannels(@Path(value="deviceId")
java.lang.String deviceId)
deviceId - - device identificatorExistingChannel, Observer.onError(Throwable) otherwise@POST(value="/devices/{deviceId}/transmitter")
rx.Observable<PublishChannel> createForDevice(@Body
ChannelDefinition mqttDefinition,
@Path(value="deviceId")
java.lang.String deviceId)
mqttDefinition - defines deviceId and type of transport ChannelTransport.MQTTdeviceId - device identificatorPublishChannel, Observer.onError(Throwable) otherwise