public interface TimeSequence extends Externalizable
TimerTrigger#create(TimeSequence) method and created in this way trigger to be added into the Rule.
The system provides two standard implementations of the TimeSequence interface:
CronSequence - this implementation uses a poplar approach for time scheduled fires via Cron expressions.
FixedDelaySequence - this is implementation for periodic fires in a fixed-delay execution mode.
fixed-rate (CronSequence) vs. fixed-delay (FixedDelaySequence) execution modes:
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.
Besides using the
standard system-provided implementations, the system also allows custom implementations of TimeSequence
to be provided by the users in order to define
more specific timer-based Rule fires that are beyond the scope of the standard system-provided implementations.
Custom implementations should take into account that
Externalizable, i.e., must make their objects transferable to the backend
they must provide the implementation classes on the backend, i.e., java packages should exported on
backend osgi framework (Export-Package bundle manifest header)
it is recommended to provide text-representation of the time sequence definitions, so that custom definitions can participate
in the textual representation/definition of Rules and Tasks. Handling of text representations can be done by a service
- com.prosyst.mprm.backend.rules.spi.time.sequence.TimeSequenceProvider registered on the backend. The service should
declare the same type as the type provided in getType() of the custom TimeSequence
object.| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getTextRepresentation()
Returns a text representation of this
TimeSequence object. |
java.lang.String |
getType()
Returns a distinct type name of the
TimeSequence implementation. |
readObject, writeObjectjava.lang.String getType()
TimeSequence implementation. Custom implementations should return the same name
for all instances of the same class.TimeSequence implementation.java.lang.String getTextRepresentation()
TimeSequence object. The text representation should be
self-sufficient and consistent so that it could be passed to the
{@link com.prosyst.mprm.backend.rules.spi.time.sequence.TimeSequenceProvider#parse(String,
com.prosyst.mprm.backend.rules.spi.time.SystemContext) method to fully restore the object with all time sequence data.TimeSequence object.Copyright © 2019 Bosch Software Innovations GmbH. All Rights Reserved.