|
OSGi™ Service Platform Release 4 Version 4.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A Monitoring Job is a request for scheduled or event based notifications on
update of a set of StatusVariable
s. The job is a data
structure that holds a non-empty list of StatusVariable
names,
an identification of the initiator of the job, and the sampling parameters.
There are two kinds of monitoring jobs: time based and change based. Time
based jobs take samples of all StatusVariable
s with a
specified frequency. The number of samples to be taken before the job
finishes may be specified. Change based jobs are only interested in the
changes of the monitored StatusVariable
s. In this case, the
number of changes that must take place between two notifications can be
specified.
The job can be started on the MonitorAdmin
interface. Running
the job (querying the StatusVariable
s, listening to changes,
and sending out notifications on updates) is the task of the
MonitorAdmin
implementation.
Whether a monitoring job keeps track dynamically of the
StatusVariable
s it monitors is not specified. This means that
if we monitor a StatusVariable
of a Monitorable
service which disappears and later reappears then it is implementation
specific whether we still receive updates of the StatusVariable
changes or not.
Method Summary | |
java.lang.String |
getInitiator()
Returns the identitifier of the principal who initiated the job. |
int |
getReportCount()
Returns the number of times MonitorAdmin will query the
StatusVariable s (for time based jobs), or the number of
changes of a StatusVariable between notifications (for
change based jobs). |
int |
getSchedule()
Returns the delay (in seconds) between two samples. |
java.lang.String[] |
getStatusVariableNames()
Returns the list of StatusVariable names that are the
targets of this measurement job. |
boolean |
isLocal()
Returns whether the job was started locally or remotely. |
boolean |
isRunning()
Returns whether the job is running. |
void |
stop()
Stops a Monitoring Job. |
Method Detail |
public void stop()
public java.lang.String getInitiator()
MonitorAdmin.startJob()
method is called.
This string holds the ServerID if the operation was initiated from a
remote manager, or an arbitrary ID of the initiator entity in the local
case (used for addressing notification events).
null
public java.lang.String[] getStatusVariableNames()
StatusVariable
names that are the
targets of this measurement job. For time based jobs, the
MonitorAdmin
will iterate through this list and query all
StatusVariable
s when its timer set by the job's frequency
rate expires.
null
public int getSchedule()
MonitorAdmin
queries each
StatusVariable
that belongs to this job every N seconds.
The value 0 means that the job is not scheduled but event based: in this
case instant notification on changes is requested (at every nth change of
the value, as specified by the report count parameter).
public int getReportCount()
MonitorAdmin
will query the
StatusVariable
s (for time based jobs), or the number of
changes of a StatusVariable
between notifications (for
change based jobs). Time based jobs with non-zero report count will take
getReportCount()
*getSchedule()
time to
finish. Time based jobs with 0 report count and change based jobs do not
stop automatically, but all jobs can be stopped with the stop()
method.
public boolean isLocal()
true
if the job was started from the local device,
false
if the job was initiated from a management
server through the device management treepublic boolean isRunning()
true
if the job is still running, false
if it has finished
|
OSGi™ Service Platform Release 4 Version 4.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |