server
Class GLTMonitor

java.lang.Object
  extended byjava.util.Observable
      extended byserver.GLTMonitor

public class GLTMonitor
extends java.util.Observable

The driver class for GLTMon server application. This class contains the main program that controls all the DeviceThreads, which perform the actual attribute polling.

This class contains a number of methods that work with each DeviceThread to start it and notify it that changes have occurred.

Version:
0.1
Author:
gswalters
See Also:
DeviceThread

Constructor Summary
GLTMonitor(Conf config)
          Construct a GLTMonitor object that establishes a database connection.
 
Method Summary
static void main(java.lang.String[] args)
          Main
 void monitorChanges()
          Monitor changes occuring in the database, and notify the appropriate DeviceThread.
 void shutdown()
          Invoke a clean shutdown of each DeviceThread
 void startDeviceThreads()
          Fire up the threads to control the polling of each monitored Device.
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GLTMonitor

public GLTMonitor(Conf config)
           throws server.GLTMonitor.GLTMonitorCreateException
Construct a GLTMonitor object that establishes a database connection.

Method Detail

monitorChanges

public void monitorChanges()
                    throws server.GLTMonitor.GLTMonitorDatabaseException
Monitor changes occuring in the database, and notify the appropriate DeviceThread. Periodically check the Changes table for new records.Each record indicates an action to take and the Device, DeviceInterface, or Attribute on which the change takes place.

Throws:
server.GLTMonitor.GLTMonitorDatabaseException

startDeviceThreads

public void startDeviceThreads()
                        throws server.GLTMonitor.GLTMonitorDatabaseException
Fire up the threads to control the polling of each monitored Device. Retrieves the monitored Device array, creates the array of DeviceThreads, and starts each thread.

Throws:
server.GLTMonitor.GLTMonitorDatabaseException

shutdown

public void shutdown()
Invoke a clean shutdown of each DeviceThread


main

public static void main(java.lang.String[] args)
Main