public abstract class AstarteDevice
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
mAlwaysReconnect |
protected AstarteFailedMessageStorage |
mFailedMessageStorage |
protected AstartePropertyStorage |
mPropertyStorage |
| Modifier and Type | Method and Description |
|---|---|
void |
addGlobalEventListener(AstarteGlobalEventListener eventListener) |
void |
addInterface(org.json.JSONObject astarteInterfaceObject)
Method that adds an interface dynamically to the introspection
|
boolean |
alwaysReconnects() |
abstract void |
connect() |
abstract void |
disconnect() |
java.util.Collection<java.lang.String> |
getAllInterfaceNames() |
java.util.Collection<AstarteInterface> |
getAllInterfaces() |
abstract AstarteMessageListener |
getAstarteMessageListener() |
abstract java.lang.String |
getAstarteRealm() |
abstract java.lang.String |
getDeviceId() |
AstarteInterface |
getInterface(java.lang.String interfaceName) |
boolean |
hasInterface(java.lang.String interfaceName) |
abstract boolean |
isConnected() |
void |
removeGlobalListener(AstarteGlobalEventListener eventListener) |
void |
removeInterface(java.lang.String interfaceName)
Method that dynamically removes an interface from the introspection
|
void |
setAlwaysReconnect(boolean alwaysReconnect) |
abstract void |
setAstarteMessageListener(AstarteMessageListener astarteMessageListener) |
protected final AstartePropertyStorage mPropertyStorage
protected final AstarteFailedMessageStorage mFailedMessageStorage
protected boolean mAlwaysReconnect
public boolean hasInterface(java.lang.String interfaceName)
public void addInterface(org.json.JSONObject astarteInterfaceObject)
throws AstarteInvalidInterfaceException,
AstarteInterfaceAlreadyPresentException
astarteInterfaceObject - the JSONObject representation of the interfaceAstarteInvalidInterfaceException - when the JSON Object does not represent an interface
correctlyAstarteInterfaceAlreadyPresentException - when an interface with the same name, major and
minor is already presentpublic void removeInterface(java.lang.String interfaceName)
throws AstarteInterfaceNotFoundException
interfaceName - The name of the interface to removeAstarteInterfaceNotFoundException - when no interface is found with the given namepublic java.util.Collection<java.lang.String> getAllInterfaceNames()
public java.util.Collection<AstarteInterface> getAllInterfaces()
public AstarteInterface getInterface(java.lang.String interfaceName)
public void addGlobalEventListener(AstarteGlobalEventListener eventListener)
public void removeGlobalListener(AstarteGlobalEventListener eventListener)
public abstract java.lang.String getDeviceId()
public abstract java.lang.String getAstarteRealm()
public abstract AstarteMessageListener getAstarteMessageListener()
public abstract void setAstarteMessageListener(AstarteMessageListener astarteMessageListener)
public abstract void connect()
throws AstarteTransportException,
AstarteCryptoException,
AstartePairingException
public abstract void disconnect()
throws AstarteTransportException
AstarteTransportExceptionpublic abstract boolean isConnected()
public boolean alwaysReconnects()
public void setAlwaysReconnect(boolean alwaysReconnect)