public interface EventGenerator
| Modifier and Type | Method and Description |
|---|---|
int |
getDayOfMonth()
Returns the day of month on which an event is fired
|
long |
getDelayTolerance()
Returns the permissible delay tolerance
|
java.util.Date |
getEndTime()
Returns the end time for this event generator (
null denotes indefinitely). |
java.lang.Object |
getEventData()
Returns the event data associated with this event generator.
|
java.lang.String |
getEventType()
Returns the event type of the generated events
|
java.lang.String |
getId()
Returns the identifier of this event generator
|
long |
getPeriod()
Returns the period between 2 successive events.
|
java.util.Date |
getStartTime()
Returns the start time for this event generator
|
boolean |
isFixedRate()
Returns whether this event generator is a fixed-rate.
|
boolean |
isStarted()
Checks if this event generator has been started
|
Enumerator |
previousEvents()
Deprecated.
this method is no longer supported. Its current implementation
returns an empty enumerator.
|
void |
setDayOfMonth(int dayOfMonth)
Sets the day of month on which an event is fired
|
void |
setDelayTolerance(long delayInterval)
Sets the permissible delay form firing an event by this generator.
|
void |
setEndTime(java.util.Date endTime)
Sets the end time for this event generator (
null denotes indefinitely). |
void |
setEventData(java.lang.Object data)
Sets the event data associated with this event generator.
|
void |
setFixedRate(boolean fixedRate)
In fixed-rate execution, each execution is scheduled relative to the scheduled start time.
|
void |
setPeriod(long period)
Sets the period between 2 successive events
|
void |
setStartTime(java.util.Date startTime)
Sets the start time for this event generator
|
void |
setStartTimeAfter(int millis)
Sets the start time for this event generator relative to the current time
|
void |
setTimeSequence(java.lang.String customTimeSequenceName)
Sets the time sequence used by this event generator.
|
void |
start()
Starts this event generator.
|
java.lang.String getId()
throws ManagementException
ManagementException - If no id has been setjava.lang.String getEventType()
java.lang.Object getEventData()
throws ManagementException
null.ManagementException - if on-demand construction of the data object failsvoid setEventData(java.lang.Object data)
throws ManagementException
null.data - the event data associated with this event generatorManagementException - if this generator has been startedjava.util.Date getStartTime()
void setStartTime(java.util.Date startTime)
throws ManagementException
startTime - the start time for this event generator (null denotes right now)ManagementException - if this generator has been startedvoid setStartTimeAfter(int millis)
throws ManagementException
millis - the start time for this event generator will be the current time plus
the specified amount of milliseconds.ManagementException - if this generator has been startedjava.util.Date getEndTime()
null denotes indefinitely).null denotes indefinitely)void setEndTime(java.util.Date endTime)
throws ManagementException
null denotes indefinitely).endTime - the end time for this event generator (null denotes indefinitely).ManagementException - if this generator has been startedlong getPeriod()
throws ManagementException
ManagementException - if this is not a periodical eventvoid setPeriod(long period)
throws ManagementException
period - the period between 2 successive events in millisecondsManagementException - if this generator has been startedvoid 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 behaviour of periodical generators defined by this service is
fixed-delay. This method enables definining of fixed-rate schedulres
by invoking it with true parameter.
Generators defined by day-of-mount are always fixed-rate and this method does not effect them.
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 the generator is a fixed-rate, false
otherwise.setFixedRate(boolean fixedRate)void setDelayTolerance(long delayInterval)
throws ManagementException
delayInterval - permissible delay interval in milliseconds.ManagementException - if the generator is already started.long getDelayTolerance()
setDelayTolerance(long delayInterval)int getDayOfMonth()
throws ManagementException
if - this is not a monthly eventManagementExceptionvoid setDayOfMonth(int dayOfMonth)
throws ManagementException
dayOfMonth - the day of month on which an event is firedManagementException - if this generator has been startedvoid start()
throws ManagementException
ManagementException - if this generator cannot be startedboolean isStarted()
Enumerator previousEvents() throws ManagementException
ManagementException - if the previous events cannot be obtainedvoid setTimeSequence(java.lang.String customTimeSequenceName)
throws ManagementException
customTimeSequenceName - the name under which the time sequence for this
event generator is registred in the frameworkManagementException - if an error occurs.Copyright © 2019 Bosch Software Innovations GmbH. All Rights Reserved.