public interface

Driver

org.ocast.core.Driver
Known Indirect Subclasses

Class Overview

Manage the connection to a device module and the communication with its browser

Summary

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

Public Methods

public abstract void connect (Driver.Module module, Runnable onSuccess, Consumer<Throwable> onFailure)

Establish a network communication channel with the given Module

Parameters
module the targeted Module
onSuccess to be called in case of success.
onFailure to be called in case of error.

public abstract void connect (Driver.Module module, AdditionalData additionalData, Runnable onSuccess, Consumer<Throwable> onFailure)

Establish a network communication channel with the given Module

Parameters
module the targeted Module
onSuccess to be called in case of success.
onFailure to be called in case of error.

public abstract void disconnect (Driver.Module module, Runnable onSuccess)

Disconnects the given Module

Parameters
module the module to be disconnected
onSuccess to be called in case of success.

public abstract PublicSettings getPublicSettings ()

public abstract void registerBrowser (Driver.BrowserListener browser)

public abstract void sendBrowserData (JSONObject data, Consumer<JSONObject> onSuccess, Consumer<Throwable> onFailure)

Sends data the the remote application browser