org.ocast.core.Driver |
Known Indirect Subclasses |
Manage the connection to a device module and the communication with its browser
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
interface | Driver.BrowserListener | Callback to notify that the remote browser sent data | |||||||||
interface | Driver.DriverListener | Callback invoked when a failure occured in the Driver | |||||||||
interface | Driver.Factory | Factory to create a Driver | |||||||||
enum | Driver.Failure | ||||||||||
enum | Driver.Module | Internal module accessible within the device |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void |
connect(Driver.Module module, Runnable onSuccess, Consumer<Throwable> onFailure)
Establish a network communication channel with the given
Module | ||||||||||
abstract void |
connect(Driver.Module module, AdditionalData additionalData, Runnable onSuccess, Consumer<Throwable> onFailure)
Establish a network communication channel with the given
Module | ||||||||||
abstract void |
disconnect(Driver.Module module, Runnable onSuccess)
Disconnects the given
Module | ||||||||||
abstract PublicSettings | getPublicSettings() | ||||||||||
abstract void | registerBrowser(Driver.BrowserListener browser) | ||||||||||
abstract void |
sendBrowserData(JSONObject data, Consumer<JSONObject> onSuccess, Consumer<Throwable> onFailure)
Sends data the the remote application browser
|
Establish a network communication channel with the given Module
module | the targeted Module |
---|---|
onSuccess | to be called in case of success. |
onFailure | to be called in case of error. |
DriverException |
---|
Establish a network communication channel with the given Module
module | the targeted Module |
---|---|
onSuccess | to be called in case of success. |
onFailure | to be called in case of error. |
DriverException |
---|
Disconnects the given Module
module | the module to be disconnected |
---|---|
onSuccess | to be called in case of success. |
Sends data the the remote application browser