T
- The CommandIdInterface which can uniquely identify the type of the command.public class Command<T extends CommandIdInterface>
extends java.lang.Object
Network.sendNetworkManagementCommand(buzz.getcoco.iot.Command<buzz.getcoco.iot.Network.CommandId>, buzz.getcoco.iot.Network.NetworkManagementStatusListener)
Device.sendDeviceManagementCommand(buzz.getcoco.iot.Command<buzz.getcoco.iot.Device.CommandId>, buzz.getcoco.iot.Device.DeviceManagementStatusListener)
Capability.sendResourceCommand(buzz.getcoco.iot.Command<T>, buzz.getcoco.iot.Capability.CommandStatusListener<T>)
.Modifier and Type | Class and Description |
---|---|
static class |
Command.State
An enum denoting possible values of state of Command sent.
|
Modifier | Constructor and Description |
---|---|
protected |
Command(T commandId)
This is used to as the argument to sendResourceCommand().
|
protected |
Command(T commandId,
long commandTimeout)
This is used to as the argument to sendResourceCommand().
|
Modifier and Type | Method and Description |
---|---|
T |
getCommandId()
A function to get the id of the command.
|
long |
getTimeout()
A function to set the timeout of this command.
|
protected void |
setCommandId(CommandIdInterface commandId)
A function to set the id of the command.
|
Command<T> |
setTimeout(long commandTimeout)
A function to set the timeout of this command.
|
protected com.google.gson.JsonObject |
toJsonObject()
A function to create the Json format of the command.
|
java.lang.String |
toString() |
protected Command(T commandId, long commandTimeout)
commandId
- The Object denoting which command that is being sent.commandTimeout
- The timeout for this commandprotected Command(T commandId)
commandId
- The Object denoting which command that is being sent.public T getCommandId()
protected void setCommandId(CommandIdInterface commandId)
public Command<T> setTimeout(long commandTimeout)
commandTimeout
- The timeout for this commandpublic long getTimeout()
protected com.google.gson.JsonObject toJsonObject()
public java.lang.String toString()
toString
in class java.lang.Object