public interface IConnectorPreferences
Several parameters of Cloud Connector requires some user configuration. These parameters are usually stored as preferences in the device. Since each device may have its own way to store preferences or properties, this interface defines the required methods that should be implemented by each device for that purpose. This allows the device to define its own strategy to work with preferences.
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAuthorizationPassword()
Retrieves the authorization password setting value if the authorization
type is configured to
PreferencesConstants.AUTHORIZATION_TYPE_BASIC
(). |
java.lang.String |
getAuthorizationType()
Retrieves the connection authorization type.
|
java.lang.String |
getContact()
Retrieves the Cloud Connector device contact setting.
|
java.lang.String |
getDescription()
Retrieves the Cloud Connector device description setting.
|
java.lang.String |
getDeviceID()
Retrieves the device's Device ID.
|
java.lang.String |
getDeviceType()
Retrieves the device type.
|
java.lang.String |
getFileSystemRootDir()
Retrieves the file system root (sandbox) directory.
|
java.lang.String |
getFirmwareVersion()
Retrieves the 4 digit firmware version of the system.
|
int |
getKeepAliveTime()
Retrieves the keep alive time setting value in seconds.
|
java.lang.String |
getLocation()
Retrieves the Cloud Connector device location setting.
|
int |
getReconnectTime()
Retrieves the configured reconnect time delay setting in seconds.
|
int |
getServerKeepAliveTime()
Retrieves the server keep alive time setting value in seconds.
|
Location |
getStaticLocation()
Retrieves the static location to use.
|
java.lang.String |
getURLString()
Retrieves the configured Cloud Connector URL preference.
|
byte[] |
getVendorID()
Retrieves the device vendor ID.
|
int |
getWaitTimes()
Retrieves the value of the wait times preference.
|
boolean |
isCompressionEnabled()
Retrieves whether messages compression is enabled or not.
|
boolean |
isDataServiceEnabled()
Retrieves whether the data service is enabled or not.
|
boolean |
isFileSystemEnabled()
Retrieves whether file system should be enabled or not.
|
boolean |
isRCIEnabled()
Retrieves whether the RCI facility is enabled or not.
|
boolean |
isReconnectEnabled()
Retrieves whether reconnect setting is enabled or not.
|
boolean |
isSecureConnectionEnabled()
Retrieves whether secure connection is enabled or not.
|
void |
setAuthorizationPassword(java.lang.String password)
Sets the authorization password setting new value.
|
void |
setAuthorizationType(java.lang.String authorizationType)
Sets the new value for the connection authorization type setting.
|
void |
setCompressionEnabled(boolean enabled)
Sets the new value of the compress messages setting.
|
void |
setContact(java.lang.String contact)
Sets the Cloud Connector device contact setting.
|
void |
setDescription(java.lang.String description)
Sets the Cloud Connector device description setting.
|
void |
setDeviceID(java.lang.String deviceID)
Stores the device ID.
|
void |
setKeepAliveTime(int time)
Sets the new value for the Keep Alive time setting in seconds.
|
void |
setLocation(java.lang.String location)
Sets the Cloud Connector device location setting.
|
void |
setReconnectEnabled(boolean enabled)
Sets the new value of the reconnect setting.
|
void |
setReconnectTime(int time)
Sets the new value for the reconnect time setting in seconds.
|
void |
setSecureConnectionEnabled(boolean value)
Sets the new value for the use secure connection setting.
|
void |
setServerKeepAliveTime(int time)
Sets the new value for the Server Keep Alive time setting in seconds.
|
void |
setStaticLocation(Location location)
Sets the value of the static location.
|
void |
setURLString(java.lang.String url)
Sets the Cloud Connector URL preference.
|
void |
setUseStaticLocation(boolean useStaticLocation)
Sets the value of use static location preference.
|
void |
setVendorID(java.lang.String vendorID)
Sets the Cloud Connector Vendor ID setting.
|
void |
setWaitTimes(int waitTimes)
Sets the new value for the wait times setting.
|
boolean |
useStaticLocation()
Retrieves whether static location will be used or not.
|
java.lang.String getAuthorizationPassword()
PreferencesConstants.AUTHORIZATION_TYPE_BASIC
().PreferencesConstants.AUTHORIZATION_TYPE_BASIC,
setAuthorizationPassword(java.lang.String),
getAuthorizationType(),
setAuthorizationType(java.lang.String)java.lang.String getAuthorizationType()
It should be PreferencesConstants.AUTHORIZATION_TYPE_NONE or
PreferencesConstants.AUTHORIZATION_TYPE_BASIC
().
For the PreferencesConstants.AUTHORIZATION_TYPE_BASIC
authorization type a password should be provided
getAuthorizationPassword().
PreferencesConstants.AUTHORIZATION_TYPE_NONE,
PreferencesConstants.AUTHORIZATION_TYPE_BASIC,
setAuthorizationType(java.lang.String),
getAuthorizationPassword(),
setAuthorizationPassword(java.lang.String)java.lang.String getContact()
PreferencesConstants.DEFAULT_CONTACT
().PreferencesConstants.DEFAULT_CONTACT,
setContact(java.lang.String)java.lang.String getDescription()
PreferencesConstants.DEFAULT_DESCRIPTION
().PreferencesConstants.DEFAULT_DESCRIPTION,
setDescription(java.lang.String)java.lang.String getDeviceID()
This method should return null to use provisioning to get the
Device ID.
java.lang.String getDeviceType()
A null or empty string is an invalid value.
The maximum length of this string is
PreferencesConstants.DEVICE_TYPE_MAXIMUM_LENGTH
().
PreferencesConstants.DEVICE_TYPE_MAXIMUM_LENGTHjava.lang.String getFileSystemRootDir()
isFileSystemEnabled()java.lang.String getFirmwareVersion()
This version will be used as Firmware Target 0x00 version
if no firmware targets are provided (see
IFirmwareUpdateImplementation.getFirmwareTargets()),
if no firmware target 0x00 is defined or it is invalid.
In these cases a virtual target 0x00 non-update-able will be
generated using the version provided by this method.
Target 0x00 represents the firmware that is running Cloud
Connector.
int getKeepAliveTime()
The value should be:
time > PreferenceConstants.KEEP_ALIVE_MINIMUM_VALUE
()time < PreferenceConstants.KEEP_ALIVE_MAXIMUM_VALUE
()PreferencesConstants.DEFAULT_KEEP_ALIVE_TIME
().PreferencesConstants.DEFAULT_KEEP_ALIVE_TIME,
setKeepAliveTime(int)java.lang.String getLocation()
PreferencesConstants.DEFAULT_LOCATION
().PreferencesConstants.DEFAULT_LOCATION,
setLocation(java.lang.String)int getReconnectTime()
The value should be:
time > PreferenceConstants.RECONNECT_TIME_MINIMUM_VALUE
()time < PreferenceConstants.RECONNECT_TIME_MAXIMUM_VALUE
()PreferencesConstants.DEFAULT_RECONNECT_TIME
()..PreferencesConstants.DEFAULT_RECONNECT_TIME,
PreferencesConstants.RECONNECT_TIME_MINIMUM_VALUE,
PreferencesConstants.RECONNECT_TIME_MAXIMUM_VALUE,
PreferencesConstants.RECONNECT_TIME_MAX_RANDOM,
setReconnectTime(int),
isReconnectEnabled(),
setReconnectEnabled(boolean)int getServerKeepAliveTime()
The value should be:
time > PreferenceConstants.KEEP_ALIVE_MINIMUM_VALUE
()time < PreferenceConstants.KEEP_ALIVE_MAXIMUM_VALUE
()PreferencesConstants.DEFAULT_SERVER_KEEP_ALIVE_TIME
().PreferencesConstants.DEFAULT_SERVER_KEEP_ALIVE_TIME,
setServerKeepAliveTime(int)Location getStaticLocation()
useStaticLocation(),
setUseStaticLocation(boolean),
setStaticLocation(com.etherios.connector.core.system.Location)java.lang.String getURLString()
It should be PreferencesConstants.URL_US
(PreferencesConstants.URL_US) or
PreferencesConstants.URL_UK (PreferencesConstants.URL_UK).
null if not
configured.PreferencesConstants.URL_US,
PreferencesConstants.URL_UK,
setURLString(java.lang.String)byte[] getVendorID()
null if not configured.int getWaitTimes()
The value should be:
times > PreferenceConstants.WAIT_TIMES_MINIMUM_VALUE
()times < PreferenceConstants.WAIT_TIMES_MAXIMUM_VALUE
()PreferencesConstants.DEFAULT_WAIT_TIMES
()
if not configured.PreferencesConstants.DEFAULT_WAIT_TIMES,
PreferencesConstants.WAIT_TIMES_MINIMUM_VALUE,
PreferencesConstants.WAIT_TIMES_MAXIMUM_VALUE,
setWaitTimes(int)boolean isCompressionEnabled()
The default value is returned if it is not configured
PreferencesConstants.DEFAULT_ENABLE_COMPRESSION
().
true if messages compression is enabled, false
otherwise.PreferencesConstants.DEFAULT_ENABLE_COMPRESSION,
setCompressionEnabled(boolean)boolean isDataServiceEnabled()
The default value is returned if it is not configured
PreferencesConstants.DEFAULT_ENABLE_DATA_SERVICE
().
true if the data service is enabled, false
otherwise.PreferencesConstants.DEFAULT_ENABLE_DATA_SERVICEboolean isFileSystemEnabled()
The default value is returned if it is not configured
PreferencesConstants.DEFAULT_ENABLE_FILE_SYSTEM
().
true if file system is enabled, false otherwise.PreferencesConstants.DEFAULT_ENABLE_FILE_SYSTEM,
getFileSystemRootDir()boolean isRCIEnabled()
The default value is returned if it is not configured
PreferencesConstants.DEFAULT_ENABLE_RCI
().
true if RCI facility is enabled, false otherwise.PreferencesConstants.DEFAULT_ENABLE_RCIboolean isReconnectEnabled()
The default value is returned if it is not configured
PreferencesConstants.DEFAULT_ENABLE_RECONNECT
().
true if reconnect setting is configured, false
otherwise.PreferencesConstants.DEFAULT_ENABLE_RECONNECT,
setReconnectEnabled(boolean),
getReconnectTime(),
setReconnectTime(int)boolean isSecureConnectionEnabled()
The default value is returned if it is not configured
PreferencesConstants.DEFAULT_ENABLE_SECURE_CONNECTION
().
true if secure connection is enabled, false
otherwise.PreferencesConstants.DEFAULT_ENABLE_SECURE_CONNECTION,
setSecureConnectionEnabled(boolean)void setAuthorizationPassword(java.lang.String password)
PreferencesConstants.AUTHORIZATION_TYPE_BASIC
().password - New value for the authorization password setting.PreferencesConstants.AUTHORIZATION_TYPE_NONE,
PreferencesConstants.AUTHORIZATION_TYPE_BASIC,
getAuthorizationPassword(),
getAuthorizationType(),
setAuthorizationType(java.lang.String)void setAuthorizationType(java.lang.String authorizationType)
It should be PreferencesConstants.AUTHORIZATION_TYPE_NONE or
PreferencesConstants.AUTHORIZATION_TYPE_BASIC
().
For the PreferencesConstants.AUTHORIZATION_TYPE_BASIC
authorization type a password should be provided
getAuthorizationPassword().
authorizationType - Value of connection authorization type.PreferencesConstants.AUTHORIZATION_TYPE_NONE,
PreferencesConstants.AUTHORIZATION_TYPE_BASIC,
getAuthorizationType(),
getAuthorizationPassword(),
setAuthorizationPassword(java.lang.String)void setCompressionEnabled(boolean enabled)
enabled - true to compress messages, false otherwise.isCompressionEnabled()void setContact(java.lang.String contact)
contact - The Cloud Connector device contact setting.getContact()void setDescription(java.lang.String description)
description - The Cloud Connector device description setting.getDescription()void setDeviceID(java.lang.String deviceID)
null device ID.deviceID - Device ID to store.void setKeepAliveTime(int time)
The value should be:
time > PreferenceConstants.KEEP_ALIVE_MINIMUM_VALUE
()time < PreferenceConstants.KEEP_ALIVE_MAXIMUM_VALUE
()time - New value for the Keep Alive time setting.PreferencesConstants.DEFAULT_KEEP_ALIVE_TIME,
PreferencesConstants.KEEP_ALIVE_MINIMUM_VALUE,
PreferencesConstants.KEEP_ALIVE_MAXIMUM_VALUE,
getKeepAliveTime()void setLocation(java.lang.String location)
location - The Cloud Connector device location setting.getLocation()void setReconnectEnabled(boolean enabled)
enabled - true to enable reconnect, false otherwise.isReconnectEnabled(),
getReconnectTime(),
setReconnectTime(int)void setReconnectTime(int time)
The value should be:
time > PreferenceConstants.RECONNECT_TIME_MINIMUM_VALUE
()time < PreferenceConstants.RECONNECT_TIME_MAXIMUM_VALUE
()time - New value for the reconnect time setting.PreferencesConstants.DEFAULT_RECONNECT_TIME,
PreferencesConstants.RECONNECT_TIME_MINIMUM_VALUE,
PreferencesConstants.RECONNECT_TIME_MAXIMUM_VALUE,
PreferencesConstants.RECONNECT_TIME_MAX_RANDOM,
getReconnectTime(),
isReconnectEnabled(),
setReconnectEnabled(boolean)void setSecureConnectionEnabled(boolean value)
value - true to enable secure connection, false
otherwise.isSecureConnectionEnabled()void setServerKeepAliveTime(int time)
The value should be:
time > PreferenceConstants.KEEP_ALIVE_MINIMUM_VALUE
()time < PreferenceConstants.KEEP_ALIVE_MAXIMUM_VALUE
()time - New value for the Server Keep Alive time setting.PreferencesConstants.DEFAULT_SERVER_KEEP_ALIVE_TIME,
getServerKeepAliveTime()void setStaticLocation(Location location)
location - The static location value.useStaticLocation(),
setUseStaticLocation(boolean),
getStaticLocation()void setURLString(java.lang.String url)
It should be PreferencesConstants.URL_US
(PreferencesConstants.URL_US) or
PreferencesConstants.URL_UK (PreferencesConstants.URL_UK).
url - The new Cloud Connector URL.PreferencesConstants.URL_US,
PreferencesConstants.URL_UK,
getURLString()void setUseStaticLocation(boolean useStaticLocation)
useStaticLocation - true to use static location,
false otherwise.useStaticLocation(),
getStaticLocation(),
setStaticLocation(com.etherios.connector.core.system.Location)void setVendorID(java.lang.String vendorID)
vendorID - The Cloud Connector VendorID setting.void setWaitTimes(int waitTimes)
The value should be:
times > PreferenceConstants.WAIT_TIMES_MINIMUM_VALUE
()times < PreferenceConstants.WAIT_TIMES_MAXIMUM_VALUE
()waitTimes - New value of the wait times setting.PreferencesConstants.WAIT_TIMES_MINIMUM_VALUE,
PreferencesConstants.WAIT_TIMES_MAXIMUM_VALUE,
getWaitTimes()boolean useStaticLocation()
The default value is returned if it is not configured
PreferencesConstants.DEFAULT_USE_STATIC_LOCATION
().
true if static location will be used, false
otherwise.PreferencesConstants.DEFAULT_USE_STATIC_LOCATION,
setUseStaticLocation(boolean),
getStaticLocation(),
setStaticLocation(com.etherios.connector.core.system.Location)© Copyright 2014 Etherios, Inc. All rights reserved. Etherios, Inc. is a Division of Digi International Inc.