All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class oplan.acp3.KqmlWatcher

java.lang.Object
   |
   +----oplan.acp3.KqmlWatcher

public class KqmlWatcher
extends Object
A KqmlWatcher is used to look for significant Kqml messages and tell an implementation of ProcessViewer about them.

See Also:
ProcessViewer, MessageWatcher

Variable Index

 o kqmlAgent
 o kqmlAgentName
Our name as a Kqml agent
 o kqmlEvents
 o viewer

Constructor Index

 o KqmlWatcher(ProcessViewer)
Create a KqmlWatcher connected to a ProcessViewer.

Method Index

 o analyzeMessage(Message)
Performs the actual message analysis.
 o fatalException(Exception)
fatalException is called when an exception indicates that something that must happen has failed, and there isn't anything in the system that would enable it to fix the problem and try again.
 o init()
The init() method creates a KqmlAgent and then registers message handlers for the Kqml performatives we care about.
 o pleaseAnalyze(Message)
Enqueues a Kqml Message for analysis in watcherMainLoop.
 o setViewer(ProcessViewer)
Change the ProcessViewer that the KqmlWatcher tells of status changes.
 o shutdown()
shutdown should be called before the system exits so that it can call kqmlAgent.shutdown().
 o watcherMainLoop()
Analyzes messages enqueued by pleaseAnalyze.

Variables

 o viewer
 protected ProcessViewer viewer
 o kqmlAgent
 protected KqmlAgent kqmlAgent
 o kqmlEvents
 protected MessageQueue kqmlEvents
 o kqmlAgentName
 protected static String kqmlAgentName
Our name as a Kqml agent

Constructors

 o KqmlWatcher
 public KqmlWatcher(ProcessViewer viewer)
Create a KqmlWatcher connected to a ProcessViewer.

Methods

 o setViewer
 public void setViewer(ProcessViewer viewer)
Change the ProcessViewer that the KqmlWatcher tells of status changes.

 o init
 public void init()
The init() method creates a KqmlAgent and then registers message handlers for the Kqml performatives we care about.

 o watcherMainLoop
 public void watcherMainLoop()
Analyzes messages enqueued by pleaseAnalyze.

 o pleaseAnalyze
 public void pleaseAnalyze(Message msg)
Enqueues a Kqml Message for analysis in watcherMainLoop.

 o analyzeMessage
 protected void analyzeMessage(Message msg)
Performs the actual message analysis.

 o shutdown
 public void shutdown()
shutdown should be called before the system exits so that it can call kqmlAgent.shutdown(). The main program class should define a shutdown method that calls our shutdown method, and ACP3.exit will then cause the right things to happen. That is, we should have something like: ACP3.exit --> main program class shutdown --> KqmlWatcher shutdown --> KqmlAgent shutdown.

 o fatalException
 static void fatalException(Exception e)
fatalException is called when an exception indicates that something that must happen has failed, and there isn't anything in the system that would enable it to fix the problem and try again.


All Packages  Class Hierarchy  This Package  Previous  Next  Index