|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.knowhowlab.osgi.monitoradmin.job.AbstractMonitoringJob
public abstract class AbstractMonitoringJob
Abstract MonitoringJob
| Field Summary | |
|---|---|
protected int |
count
|
protected boolean |
isRunning
|
protected LogVisitor |
logVisitor
|
protected int |
schedule
|
protected java.util.Set<java.lang.String> |
statusVariablePaths
|
protected MonitoringJobVisitor |
visitor
|
| Constructor Summary | |
|---|---|
protected |
AbstractMonitoringJob(MonitoringJobVisitor visitor,
LogVisitor logVisitor,
java.lang.String initiator,
java.lang.String[] statusVariablePaths,
int count)
|
protected |
AbstractMonitoringJob(MonitoringJobVisitor visitor,
LogVisitor logVisitor,
java.lang.String initiator,
java.lang.String[] statusVariablePaths,
int schedule,
int count)
|
| Method Summary | |
|---|---|
abstract void |
cancel()
Cancel job internaly |
java.lang.String |
getInitiator()
Returns the identifier of the principal who initiated the job. |
int |
getReportCount()
Returns the number of times MonitorAdmin will query the
StatusVariables (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. |
abstract void |
handleUpdateEvent(java.lang.String monitorableId,
StatusVariable statusVariable)
Handle StatusVariable update event |
abstract boolean |
isHandleUpdateEvent(java.lang.String path)
Does job handle StatusVariable update event |
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. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected MonitoringJobVisitor visitor
protected LogVisitor logVisitor
protected java.util.Set<java.lang.String> statusVariablePaths
protected boolean isRunning
protected int schedule
protected int count
| Constructor Detail |
|---|
protected AbstractMonitoringJob(MonitoringJobVisitor visitor,
LogVisitor logVisitor,
java.lang.String initiator,
java.lang.String[] statusVariablePaths,
int schedule,
int count)
protected AbstractMonitoringJob(MonitoringJobVisitor visitor,
LogVisitor logVisitor,
java.lang.String initiator,
java.lang.String[] statusVariablePaths,
int count)
| Method Detail |
|---|
public void stop()
MonitoringJob
stop in interface MonitoringJobpublic java.lang.String getInitiator()
MonitoringJobMonitorAdmin.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).
getInitiator in interface MonitoringJobnullpublic java.lang.String[] getStatusVariableNames()
MonitoringJobStatusVariable names that are the
targets of this measurement job. For time based jobs, the
MonitorAdmin will iterate through this list and query all
StatusVariables when its timer set by the job's frequency
rate expires.
getStatusVariableNames in interface MonitoringJobnullpublic int getSchedule()
MonitoringJobMonitorAdmin 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 n-th change of
the value, as specified by the report count parameter).
getSchedule in interface MonitoringJobpublic int getReportCount()
MonitoringJobMonitorAdmin will query the
StatusVariables (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 MonitoringJob.stop()
method.
getReportCount in interface MonitoringJobpublic boolean isLocal()
MonitoringJob
isLocal in interface MonitoringJobtrue 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()
MonitoringJob
isRunning in interface MonitoringJobtrue if the job is still running, false
if it has finishedpublic abstract void cancel()
public abstract boolean isHandleUpdateEvent(java.lang.String path)
path - StatusVariable path
true - handles, otherwise - false
public abstract void handleUpdateEvent(java.lang.String monitorableId,
StatusVariable statusVariable)
monitorableId - monitorableIdstatusVariable - statusVariablepublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||