| java.lang.Object | |
| ↳ | org.ocast.core.Browser |
Class managing communication with the remote browser
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
Browser(Driver driver)
Initializes a new Browser that will use the given
Driver to communicate
with the device. | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| void | onData(JSONObject browserData) | ||||||||||
| void |
registerStream(DataStream dataStream)
Registers a
DataStream that will be able to communicate with
the remote browser | ||||||||||
| void |
sendData(String service, JSONObject data, Consumer<JSONObject> onSuccess, Consumer<Throwable> onFailure)
Sends data to the browser specifying a specific service to be addressed.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.ocast.core.Driver.BrowserListener
| |||||||||||
Registers a DataStream that will be able to communicate with
the remote browser
| dataStream | a DataStream object that will be managed by this Browser
|
|---|
Sends data to the browser specifying a specific service to be addressed. It basically wraps data adding the service key
| service | the targeted service |
|---|---|
| data | data to be sent |
| onSuccess | to be called on success |
| onFailure | to be called on failure |