Klasse ConnectionSettings
The ConnectionSettings properties are affecting the connection especially for background processing and automated reconnects.
Changing the values affects the next connection. If changed during a running connection the changes will affect the connection immediately.
The settings are defined for one Blukii object. You can access the ConnectionSettings
by calling Blukii.getConnectionSettings().
Every settings value is writable and has a default value that is used if not changed by the developer.
- Siehe auch:
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungintGets the user defined connection timeout (in milliseconds) for theBlukii.connect(ConnectionListener)request.booleanGets if the blukii should be automatically reconnected after a disconnect.voidsetAutoReconnectEnabled(boolean enabled) Sets if the blukii should be automatically reconnected after a disconnect.voidsetConnectionTimeout(int connectionTimeout) Sets the user defined connection timeout (in milliseconds) for theBlukii.connect(ConnectionListener)request.
-
Konstruktordetails
-
ConnectionSettings
public ConnectionSettings()
-
-
Methodendetails
-
getConnectionTimeout
public int getConnectionTimeout()Gets the user defined connection timeout (in milliseconds) for theBlukii.connect(ConnectionListener)request.If connection timeout is larger than 0 and less than 30 seconds the connection request is canceled.
Default value: 30000ms.
- Gibt zurück:
- connection timeout in milliseconds
-
setConnectionTimeout
public void setConnectionTimeout(int connectionTimeout) Sets the user defined connection timeout (in milliseconds) for theBlukii.connect(ConnectionListener)request.If connection timeout is larger than 0 and less than 30 seconds the connection request is canceled.
Default value: 30000ms.
- Parameter:
connectionTimeout- connection timeout in milliseconds
-
isAutoReconnectEnabled
public boolean isAutoReconnectEnabled()Gets if the blukii should be automatically reconnected after a disconnect.If this option is set, the SDK tries to reconnect until
Blukii.disconnect()is called by the application.Default: false
- Gibt zurück:
- auto reconnect state
-
setAutoReconnectEnabled
public void setAutoReconnectEnabled(boolean enabled) Sets if the blukii should be automatically reconnected after a disconnect.If this option is set, the SDK tries to reconnect until
Blukii.disconnect()is called by the application.Default: false
- Parameter:
enabled- reconnect state
-