public class ConnectionStateBuilder
extends java.lang.Object
Constructor and Description |
---|
ConnectionStateBuilder()
Initializes connection state builder with the default value (all off).
|
ConnectionStateBuilder(ConnectionState state)
Initializes connection state builder with the the predefined bit mask.
|
ConnectionStateBuilder(long bitMask)
Initializes connection state builder with the the predefined bit mask.
|
Modifier and Type | Method and Description |
---|---|
ConnectionState |
build()
Builds connection state instance, which is ready to be passed as Appium server parameter.
|
ConnectionStateBuilder |
withAirplaneModeDisabled()
Sets airplane mode to disabled state if it was enabled.
|
ConnectionStateBuilder |
withAirplaneModeEnabled()
Sets airplane mode to enabled state if it was disabled.
|
ConnectionStateBuilder |
withDataDisabled()
Sets data connection mode to disabled state if it was enabled.
|
ConnectionStateBuilder |
withDataEnabled()
Sets data connection mode to enabled state if it was disabled.
|
ConnectionStateBuilder |
withWiFiDisabled()
Sets Wi-Fi connection mode to disabled state if it was enabled.
|
ConnectionStateBuilder |
withWiFiEnabled()
Sets Wi-Fi connection mode to enabled state if it was disabled.
|
public ConnectionStateBuilder()
public ConnectionStateBuilder(long bitMask)
bitMask
- the actual initial state bit mask to setpublic ConnectionStateBuilder(ConnectionState state)
state
- the actual initial state to setpublic ConnectionStateBuilder withAirplaneModeEnabled()
public ConnectionStateBuilder withAirplaneModeDisabled()
public ConnectionStateBuilder withWiFiEnabled()
public ConnectionStateBuilder withWiFiDisabled()
public ConnectionStateBuilder withDataEnabled()
public ConnectionStateBuilder withDataDisabled()
public ConnectionState build()