java.lang.Object | |
↳ | org.ocast.core.DeviceManager |
Device manager is used to get control over your device.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
enum | DeviceManager.Failure |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DeviceManager(Device device, Consumer<DeviceManager.Failure> listener)
Initializes a new DeviceManager
| |||||||||||
DeviceManager(Device device, SSLConfig sslConfig, Consumer<DeviceManager.Failure> listener)
Initializes a new DeviceManager
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
getApplicationController(String appId, Consumer<ApplicationController> onSuccess, Consumer<Throwable> onFailure)
Used to retrieve a reference to the
ApplicationController | ||||||||||
void |
getPrivateSettings(Consumer<PublicSettings> onSuccess, Consumer<Throwable> onFailure)
Used to get a reference to the private Setting controller class
| ||||||||||
void |
getPublicSettings(Consumer<PublicSettings> onSuccess, Consumer<Throwable> onFailure)
Used to get a reference to the public Settings controller class
| ||||||||||
void | onFailure(Driver.Failure failure) | ||||||||||
static void |
registerDriver(String id, Driver.Factory factory)
Registers a driver to connect to a device.
| ||||||||||
void |
releasePrivateSettings(Runnable callback)
Used to release the private settings controller resources
| ||||||||||
void |
releasePublicSettings(Runnable callback)
Used to release the public settings controller resources
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.ocast.core.Driver.DriverListener
|
Initializes a new DeviceManager
device | the device to be managed |
---|---|
listener | to be called to notify failures |
Initializes a new DeviceManager
device | the device to be managed |
---|---|
sslConfig | SSL configuration info |
listener | to be called to notify failures |
Used to retrieve a reference to the ApplicationController
appId | the application id to be managed |
---|---|
onSuccess | to be called in case of success. Returns a reference to the ApplicationController |
onFailure | to be called in case of error |
Used to get a reference to the private Setting controller class
onSuccess | to be called in case of success. Returns a reference to the publicSetting. |
---|---|
onFailure | to be called in case of error |
Used to get a reference to the public Settings controller class
onSuccess | to be called in case of success. Returns a reference to the publicSetting. |
---|---|
onFailure | to be called in case of error |
Registers a driver to connect to a device.
id | Driver manufacturer's name (cases sensitive). This value must match the manufacturer name present in the response to a MSEARCH Target |
---|---|
factory | A Driver.Factory that instantiate the relevant Driver.
|
Used to release the private settings controller resources
callback | to be called once released |
---|
Used to release the public settings controller resources
callback | to be called once released |
---|