public interface Operation
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
STATUS_DEFINED
Operation is defined but is not scheduled for execution.
|
static java.lang.String |
STATUS_FINISHED
Operation has finished its execution.
|
static java.lang.String |
STATUS_RUNNING
Operation is running.
|
static java.lang.String |
STATUS_SCHEDULED
Operation is scheduled for execution, but is not started yet.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addOperationListener(OperationListener listener)
Registers application defined listener which will be notified for status changes in the
scope of this operation.
|
void |
cancel()
Interrupts execution of the operation.
|
void |
delete()
Deletes information about this operation.
|
Command |
getCommand()
Returns a Command executed by this operation or null if the operation is defined by script
text.
|
java.lang.String |
getContextPath()
Returns target device or group of devices which are affected by the management operation.
|
long |
getDelayTolerance()
Returns the delay tolerance for this operation.
|
int |
getErrorRepliesNumber()
Returns devices that have replied error while executing the operation.
|
Enumerator |
getErrorResults()
Returns list of
OperationResult objects for devices that have
replied errors and corresponding error messages. |
java.util.Date |
getFinishTime()
Returns the time when the operation finished.
|
<any> |
getInvolvedDevices()
Returns involved devices identifiers
|
int |
getInvolvedDevicesNumber()
Returns the number of devices this operation is executing over.
|
java.lang.String |
getName()
Returns user defined name of the operation.
|
java.lang.String |
getOperationId()
Returns unique identifier of the operation.
|
int |
getPendingEvaluationDevicesNumber()
Returns the number of devices on which the operation filters have still not been evaluated
to decide if they are involved in the operation.
|
int |
getPeriod()
Returns the time period of the periodic operation in minutes.
|
OperationPermanentOptions |
getPermanentOptions()
Returns the permanent options for this operation.
|
java.lang.String |
getProcedureText()
Returns the procedure text of the operation or null if the operation is defined by a set
of Command objects.
|
java.util.Dictionary<java.lang.String,java.lang.Object> |
getProperties() |
java.util.Date |
getStartTime()
Returns the time when the operation has been started.
|
java.lang.String |
getStatus()
Returns current status of this management operation.
|
java.lang.String |
getStatusRemark()
The result of this method indicates whether the operation status returned by the
getStatus() method certainly indicates the real status of this operation
or this status is possibly incorrect because of some reason.
|
<any> |
getSuccessReplies()
Returns list of
ControlUnitID objects for devices this
operation is finished successfully |
int |
getSuccessRepliesNumber()
Returns the number of devices where this operation has been successfully executed.
|
int |
getWarningRepliesNumber()
Returns the number of devices that have replied warning while executing the operation.
|
Enumerator |
getWarningResults()
Returns list of
OperationResult objects for devices that have
replied errors and corresponding warning messages. |
boolean |
isFixedRate()
Checks if this periodic operation is in fixed-rate execution mode.
|
boolean |
isPending(java.lang.String deviceType,
java.lang.String deviceId)
Checks if this operation is pending for execution for a given device.
|
boolean |
isPeriodic()
Returns if this operation is executed over the involved devices periodically with a given
time interval.
|
boolean |
isPermanent()
Deprecated.
As of mPRM 3.3, the preferred way is to use
the extended functionality method
getPermanentOptions(). |
void |
removeOperationListener(OperationListener listener)
Unregisters operation listener.
|
void |
retry()
Re-executes operation over the devices which have replied with errors.
|
void |
retry(CommandResultListener commandResultListener)
Re-executes operation over the devices which have replied with errors.
|
void |
retry(java.lang.String deviceType,
java.lang.String deviceId)
Re-executes operation over the devices which have replied with errors.
|
void |
schedule(java.util.Date startTime)
Schedules the operation for execution on the supplied date/time.
|
void |
schedule(java.util.Date startTime,
CommandResultListener commandResultListener)
Schedules the operation for execution on the supplied date/time.
|
void |
setDelayTolerance(int delayMinutes)
Sets the permissible delay for a scheduled starting of operations.
|
void |
setFixedRate(boolean fixedRate)
Sets fixed-rate or fixed-delay execution mode for periodic operations.
|
void |
setPeriod(int minutes)
Sets/unsets the operation as periodical, specifying the execution period in minutes.
|
void |
setPermanent(boolean permanent)
Deprecated.
As of mPRM 3.3, the preferred way is to use
the extended functionality method
setPermanent(OperationPermanentOptions). |
void |
setPermanent(OperationPermanentOptions options)
Sets permanent options for this operation.
|
void |
setProperties(java.util.Dictionary<java.lang.String,java.lang.Object> properties) |
void |
start()
Starts execution of the operation.
|
void |
start(CommandResultListener commandResultListener)
Starts execution of the operation.
|
static final java.lang.String STATUS_DEFINED
static final java.lang.String STATUS_SCHEDULED
static final java.lang.String STATUS_RUNNING
static final java.lang.String STATUS_FINISHED
java.lang.String getOperationId()
throws ManagementException
ManagementException - if a system error occurs.java.lang.String getName()
java.lang.String getStatus()
throws ManagementException
ManagementException - if a system error occurs.java.lang.String getStatusRemark()
throws ManagementException
ManagementException - if a system error occurs.java.lang.String getProcedureText()
throws ManagementException
ManagementException - if a system error occurs.java.lang.String getContextPath()
throws ManagementException
ManagementException - if a system error occurs.Command getCommand() throws ManagementException
ManagementException - if a system error occurs.void setPermanent(boolean permanent)
throws ManagementException
setPermanent(OperationPermanentOptions).permanent - if set to true the operation will become permanent.ManagementException - if a system error occurs.boolean isPermanent()
throws ManagementException
getPermanentOptions().ManagementException - if a system error occurs.void setPermanent(OperationPermanentOptions options) throws ManagementException
options - permanent optionsManagementException - if a system error occurs.OperationPermanentOptions getPermanentOptions() throws ManagementException
ManagementException - if a system error occurs.java.util.Date getStartTime()
throws ManagementException
ManagementException - if a system error occurs.java.util.Date getFinishTime()
throws ManagementException
null is returned.ManagementException - if a system error occurs.boolean isPeriodic()
throws ManagementException
ManagementException - if a system error occurs.int getPeriod()
throws ManagementException
ManagementException - if a system error occurs.void setPeriod(int minutes)
throws ManagementException
minutes - the execution period in minutes. Setting this argument to 0 disables
periodical execution.ManagementException - if a system error occurs.void setFixedRate(boolean fixedRate)
throws ManagementException
The opposite of fixed-rate is the fixed-delay execution. In fixed-delay execution, each execution is scheduled relative to the actual execution time of the previous execution. If an execution is delayed for any reason subsequent executions will be delayed as well.
The default behavior of periodical operations is
fixed-delay. This method enables defining of fixed-rate periodic operations
by invoking it with true parameter.
fixedRate - true sets this generator as fixed-rate,
false sets it as fixed-delay (the default).ManagementException - if the generator is already started.boolean isFixedRate()
true if fixed-rate execution mode, false if fixed-delay.setFixedRate(boolean)void setDelayTolerance(int delayMinutes)
throws ManagementException
delayMinutes - permissible delay interval in minutes.ManagementException - if the generator is already started.long getDelayTolerance()
setDelayTolerance(int)int getInvolvedDevicesNumber()
throws ManagementException
ManagementException - if a system error occurs.int getPendingEvaluationDevicesNumber()
throws ManagementException
ManagementException - if a system error occurs.int getSuccessRepliesNumber()
throws ManagementException
ManagementException - if a system error occurs.int getErrorRepliesNumber()
throws ManagementException
ManagementException - if a system error occurs.int getWarningRepliesNumber()
throws ManagementException
ManagementException - if a system error occurs.Enumerator getErrorResults() throws ManagementException
OperationResult objects for devices that have
replied errors and corresponding error messages.null is returned.ManagementException - if a system error occurs.Enumerator getWarningResults() throws ManagementException
OperationResult objects for devices that have
replied errors and corresponding warning messages.null is returned.ManagementException - if a system error occurs.<any> getSuccessReplies()
throws ManagementException
ControlUnitID objects for devices this
operation is finished successfullynull is returned.ManagementException - if a system error occurs.<any> getInvolvedDevices()
throws ManagementException
null is returned.ManagementException - if a system error occurs.void start()
throws ManagementException
ManagementException - if a system error occurs.void start(CommandResultListener commandResultListener) throws ManagementException
commandResultListener - listener that shall receive command return results
within this operation. This listener is automatically deactivated when the
operation execution completes, but it can be explicitly be deactivated invoking the
OperationManager.removeCommandResultListener(CommandResultListener)
method.ManagementException - if a system error occurs.void schedule(java.util.Date startTime)
throws ManagementException
startTime - the operation start time.ManagementException - if a system error occurs.void schedule(java.util.Date startTime,
CommandResultListener commandResultListener)
throws ManagementException
startTime - the operation start time.commandResultListener - listener that shall receive command return results
within this operation. This listener is automatically deactivated when the
operation execution completes, but it can be explicitly be deactivated invoking the
OperationManager.removeCommandResultListener(CommandResultListener)
method.ManagementException - if a system error occurs.void cancel()
throws ManagementException
ManagementException - if a system error occurs.void delete()
throws ManagementException
ManagementException - if a system error occurs.void retry()
throws ManagementException
ManagementException - if a system error occurs.void retry(java.lang.String deviceType,
java.lang.String deviceId)
throws ManagementException
ManagementException - if a system error occurs.void retry(CommandResultListener commandResultListener) throws ManagementException
commandResultListener - listener that shall receive command return results
within this operation. This listener is automatically deactivated when the
operation execution completes, but it can be explicitly be deactivated invoking the
OperationManager.removeCommandResultListener(CommandResultListener)
method.ManagementException - if a system error occurs.void addOperationListener(OperationListener listener) throws ManagementException
listener - the listener object.ManagementException - if a system error occurs.void removeOperationListener(OperationListener listener)
listener - the listener object.boolean isPending(java.lang.String deviceType,
java.lang.String deviceId)
throws ManagementException
deviceType - device type.deviceId - device id.true if this operation is pending for execution for the device specified by the pair of
parameters deviceType and deviceId, false otherwise.ManagementException - if system error occurs.void setProperties(java.util.Dictionary<java.lang.String,java.lang.Object> properties)
throws ManagementException
ManagementExceptionjava.util.Dictionary<java.lang.String,java.lang.Object> getProperties()
throws ManagementException
ManagementExceptionCopyright © 2019 Bosch Software Innovations GmbH. All Rights Reserved.