public class OperationPermanentOptions
extends java.lang.Object
OperationPermanentOption class defines the execution behavior of permanent operations.
It provides a set of permanent options (flags), which could be arbitrary combined by the operation
initiator to define the preferred permanent execution behavior.
Operation operation; // creating some operation...
OperationPermanentOptions options = new OperationPermanentOptions();
options.setOption(OperationPermanentOptions.EXECUTE_ON_CONNECT, true);
operation.setPermanent(options);
| Modifier and Type | Field and Description |
|---|---|
static int |
DONT_EXECUTE_ON_CURRENT_DEVICES
If this option is raised, the operation will not be started on the current set of devices, but will only affect
newly registered and/or connected devices, regarding the other options.
|
static int |
EVALUATE_ONCE
This option is evaluated only if the
EXECUTE_ON_CONNECT is raised. |
static int |
EXECUTE_ON_CONNECT
If this option is raised, the operation will be executed on devices every time they connect to mPRM.
|
static int |
EXECUTE_ON_REGISTER
If this option is raised, the operation will be executed on newly registered devices.
|
protected int |
options
Holds permanent options as bit flags in an integer value.
|
static int |
REQUIRE_USER_CONFIRMATION
If this option is raised, the operation will wait for user confirmation on each device to be executed.
|
| Constructor and Description |
|---|
OperationPermanentOptions()
Creates an
OperationPermanentOptions object. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getOption(int option)
Checks whether a given permanent option is raised or not within this object.
|
int |
getOptions()
Method used by the system to get all flags in an integer value
|
void |
setOption(int option,
boolean flag)
Sets a given permanent option.
|
void |
setOptions(int options)
Method used by the system to set all flags within an integer value
|
java.lang.String |
toString() |
public static final int EXECUTE_ON_REGISTER
setOption(EXECUTE_ON_REGISTER, true) to raise this option.public static final int EXECUTE_ON_CONNECT
setOption(EXECUTE_ON_CONNECT, true) to raise this option.public static final int DONT_EXECUTE_ON_CURRENT_DEVICES
setOption(DONT_EXECUTE_ON_CURRENT_DEVICES, true) to raise this option.public static final int REQUIRE_USER_CONFIRMATION
setOption(REQUIRE_USER_CONFIRMATION, true) to raise this option.public static final int EVALUATE_ONCE
EXECUTE_ON_CONNECT is raised.
If EVALUATE_ONCE is raised, the operation will be executed on devices only once, i.e. the first time they connect to the mPRM,
on every following connect the operation will not be executed.
Use setOption(EVALUATE_ONCE, true) to raise this option.protected int options
public OperationPermanentOptions()
OperationPermanentOptions object.public boolean getOption(int option)
option - could be one of the integer constants.true if the given option is raised, false otherwise.public void setOption(int option,
boolean flag)
option - could be one of the integer constants.flag - boolean value indicating whether the permanent option is to be raised or dropped.public int getOptions()
public void setOptions(int options)
options - integer value containing all raised flags.public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2019 Bosch Software Innovations GmbH. All Rights Reserved.