java.lang.Object
org.altara.mars.engine.Controller
- All Implemented Interfaces:
- org.altara.mars.MarsModelListener
- public class Controller
- extends java.lang.Object
- implements org.altara.mars.MarsModelListener
This class controls the MARS monitoring engine. It manages the monitoring
work queue, the monitoring threads, and the service status change list.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
model
private org.altara.mars.MarsModel model
runQueue
private org.altara.util.Queue runQueue
statListeners
private java.util.HashSet statListeners
probeListeners
private java.util.HashSet probeListeners
notifyListeners
private java.util.HashSet notifyListeners
workers
private ProbeWorker[] workers
checkouts
private int checkouts
active
private boolean active
Controller
public Controller()
start
public void start()
stop
public void stop()
isActive
public boolean isActive()
getModel
public org.altara.mars.MarsModel getModel()
setModel
public void setModel(org.altara.mars.MarsModel model)
addNotificationListener
public void addNotificationListener(NotificationListener listener)
removeNotificationListener
public void removeNotificationListener(NotificationListener listener)
addStatusChangeListener
public void addStatusChangeListener(StatusChangeListener listener)
removeStatusChangeListener
public void removeStatusChangeListener(StatusChangeListener listener)
addProbeListener
public void addProbeListener(ProbeListener listener)
removeProbeListener
public void removeProbeListener(ProbeListener listener)
notifyStatusChanged
public void notifyStatusChanged(StatusChangeEvent sce)
statusChanged
public void statusChanged(org.altara.mars.Service service,
org.altara.mars.Status oldStatus,
org.altara.mars.Status newStatus)
probeRun
public void probeRun(org.altara.mars.Service service,
org.altara.mars.Status newStatus)
buildRunQueue
private int buildRunQueue()
rebuildRunQueue
public void rebuildRunQueue()
getNextProbe
Probe getNextProbe()
throws java.lang.InterruptedException
returnProbe
void returnProbe(Probe probe)
queueSize
int queueSize()
hostChanged
public void hostChanged(org.altara.mars.Host host)
- Specified by:
hostChanged in interface org.altara.mars.MarsModelListener
serviceChanged
public void serviceChanged(org.altara.mars.Service service)
- Specified by:
serviceChanged in interface org.altara.mars.MarsModelListener
hostListChanged
public void hostListChanged()
- Specified by:
hostListChanged in interface org.altara.mars.MarsModelListener
serviceListChanged
public void serviceListChanged(org.altara.mars.Host host)
- Specified by:
serviceListChanged in interface org.altara.mars.MarsModelListener