jess.server
Class DebugListener

java.lang.Object
  extended by java.util.Observable
      extended by jess.server.DebugListener
All Implemented Interfaces:
java.lang.Runnable, java.util.EventListener, JessListener

public class DebugListener
extends java.util.Observable
implements JessListener, java.lang.Runnable

This class is part of the implementation of the JessDE debugger. It's responsible for handling breakpoints and other debugger commands.

(C) 2013 Sandia Corporation


Field Summary
static java.lang.String QUIT
           
 
Constructor Summary
DebugListener(Rete engine)
           
 
Method Summary
 void addBreakpoint(java.lang.String filename, int lineNumber)
           
 void eventHappened(JessEvent je)
          DebugListener listens for special debug-mode JessEvents that signal Userfunctions being called.
 boolean isTerminated()
           
 void join()
           
 void removeBreakpoint(java.lang.String filename, int lineNumber)
           
 void run()
          The implementation of the Runnable interface.
 boolean shouldBreakAt(java.lang.String filename, int lineNumber)
           
 void start()
           
 boolean waitForConnections(int debugPort, int eventPort)
           
 
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
 

Field Detail

QUIT

public static final java.lang.String QUIT
See Also:
Constant Field Values
Constructor Detail

DebugListener

public DebugListener(Rete engine)
Method Detail

eventHappened

public void eventHappened(JessEvent je)
                   throws JessException
DebugListener listens for special debug-mode JessEvents that signal Userfunctions being called. Public due to interface implementation requirements; not for client use.

Specified by:
eventHappened in interface JessListener
Parameters:
je - a JessEvent
Throws:
JessException - if anything goes wrong or the debugger is terminated

run

public void run()
The implementation of the Runnable interface. The DebugListener should be run in a dedicated thread by calling "start()".

Specified by:
run in interface java.lang.Runnable

start

public void start()

join

public void join()
          throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

waitForConnections

public boolean waitForConnections(int debugPort,
                                  int eventPort)

addBreakpoint

public void addBreakpoint(java.lang.String filename,
                          int lineNumber)

removeBreakpoint

public void removeBreakpoint(java.lang.String filename,
                             int lineNumber)

shouldBreakAt

public boolean shouldBreakAt(java.lang.String filename,
                             int lineNumber)

isTerminated

public boolean isTerminated()

© 2013 Sandia Corporation