public class SBDevice extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
SBDevice.Builder
Device Custom Builder
|
| Modifier and Type | Field and Description |
|---|---|
private ArrayList<SBChannel> |
channels |
private static String |
CHANNELS_KEY |
private static String |
CONNECTION_KEY |
private String |
device_id |
private static String |
DEVICE_ID_KEY |
private String |
device_name |
private static String |
DEVICE_NAME_KEY |
private String |
host |
private static String |
HOST_KEY |
private static Logger |
LOGGER |
private ArrayList<SBProtocol> |
protocols |
private static String |
PROTOCOLS_KEY |
private String |
secret |
private static String |
SECRET_KEY |
private String |
vhost |
private static String |
VHOST_KEY |
| Constructor and Description |
|---|
SBDevice(org.json.JSONObject jsonObject) |
SBDevice(String device_name,
String device_id,
String secret,
ArrayList<SBProtocol> protocols,
ArrayList<SBChannel> channels,
String host,
String vhost) |
| Modifier and Type | Method and Description |
|---|---|
ArrayList<SBChannel> |
getChannels() |
String |
getDevice_id() |
String |
getDevice_name() |
String |
getHost() |
ArrayList<SBProtocol> |
getProtocols() |
String |
getSecret() |
String |
getVhost() |
String |
toString() |
private static final String CONNECTION_KEY
private static final String CHANNELS_KEY
private static final String HOST_KEY
private static final String PROTOCOLS_KEY
private static final String DEVICE_NAME_KEY
private static final String DEVICE_ID_KEY
private static final String SECRET_KEY
private static final String VHOST_KEY
private static final Logger LOGGER
private String host
private ArrayList<SBProtocol> protocols
private String device_name
private String device_id
private String secret
private String vhost
public SBDevice(String device_name, String device_id, String secret, ArrayList<SBProtocol> protocols, ArrayList<SBChannel> channels, String host, String vhost) throws SpaceBunny.ConfigurationException
device_name - name of the devicedevice_id - id of the devicesecret - secret password for the device connectionprotocols - all protocols available for devicechannels - all channels available for devicehost - to which you must connectvhost - to which you must connectSpaceBunny.ConfigurationException - configuration errorpublic SBDevice(org.json.JSONObject jsonObject)
throws org.json.JSONException
jsonObject - json object with all informationorg.json.JSONException - json read errorCopyright © 2016. All rights reserved.