org.jactr.core.runtime.controller.debug
Class DebugController

java.lang.Object
  extended by org.jactr.core.runtime.controller.DefaultController
      extended by org.jactr.core.runtime.controller.debug.DebugController
All Implemented Interfaces:
IDebugController, IController

public class DebugController
extends DefaultController
implements IDebugController

support production break points that block the model when the marked productions are instantiated and selected for firing. it also supports a few other break point types

Author:
developer

Constructor Summary
DebugController()
           
 
Method Summary
 void addBreakpoint(IModel model, BreakpointType type, java.lang.Object value)
          add a breakpoint
 void addListener(IBreakpointListener listener, java.util.concurrent.Executor executor)
          when a break point is reached, the breakpoint listeners are called
 void attach()
          attach to the runtime - called by the runtime during ACTRRuntime.setController();
 void clearBreakpoints()
          clear all of the break points permitting uninterrupted execution, unless an exception occurs
 void clearBreakpoints(IModel model, BreakpointType type)
          clear the specified breakpoints
 void detach()
          detach the runtime - called by the runtime during ACTRRuntime.setController(null);
 boolean isBreakpoint(IModel model, BreakpointType type, java.lang.Object value)
          is this object a breakpoint
 void removeBreakpoint(IModel model, BreakpointType type, java.lang.Object value)
          remove a breakpoint
 void removeListener(IBreakpointListener listener)
          remove said listener
 void setEnabled(IProduction production, boolean enabled)
           
 
Methods inherited from class org.jactr.core.runtime.controller.DefaultController
complete, getRunningModels, getSuspendedModels, getTerminatedModels, isRunning, isSuspended, resume, start, start, stop, suspend, terminate, waitForCompletion, waitForResumption, waitForStart, waitForSuspension
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jactr.core.runtime.controller.IController
complete, getRunningModels, getSuspendedModels, getTerminatedModels, isRunning, isSuspended, resume, start, start, stop, suspend, terminate, waitForCompletion, waitForResumption, waitForStart, waitForSuspension
 

Constructor Detail

DebugController

public DebugController()
Method Detail

addListener

public void addListener(IBreakpointListener listener,
                        java.util.concurrent.Executor executor)
Description copied from interface: IDebugController
when a break point is reached, the breakpoint listeners are called

Specified by:
addListener in interface IDebugController
See Also:
IDebugController.addListener(org.jactr.core.runtime.controller.debug.event.IBreakpointListener, java.util.concurrent.Executor)

removeListener

public void removeListener(IBreakpointListener listener)
Description copied from interface: IDebugController
remove said listener

Specified by:
removeListener in interface IDebugController
See Also:
IDebugController.removeListener(org.jactr.core.runtime.controller.debug.event.IBreakpointListener)

attach

public void attach()
Description copied from interface: IController
attach to the runtime - called by the runtime during ACTRRuntime.setController();

Specified by:
attach in interface IController
Overrides:
attach in class DefaultController

detach

public void detach()
Description copied from interface: IController
detach the runtime - called by the runtime during ACTRRuntime.setController(null);

Specified by:
detach in interface IController
Overrides:
detach in class DefaultController

clearBreakpoints

public void clearBreakpoints()
Description copied from interface: IDebugController
clear all of the break points permitting uninterrupted execution, unless an exception occurs

Specified by:
clearBreakpoints in interface IDebugController
See Also:
IDebugController.clearBreakpoints()

clearBreakpoints

public void clearBreakpoints(IModel model,
                             BreakpointType type)
Description copied from interface: IDebugController
clear the specified breakpoints

Specified by:
clearBreakpoints in interface IDebugController
See Also:
IDebugController.clearBreakpoints(org.jactr.core.model.IModel, org.jactr.core.runtime.controller.debug.BreakpointType)

setEnabled

public void setEnabled(IProduction production,
                       boolean enabled)
Specified by:
setEnabled in interface IDebugController

addBreakpoint

public void addBreakpoint(IModel model,
                          BreakpointType type,
                          java.lang.Object value)
Description copied from interface: IDebugController
add a breakpoint

Specified by:
addBreakpoint in interface IDebugController
See Also:
IDebugController.addBreakpoint(org.jactr.core.model.IModel, org.jactr.core.runtime.controller.debug.BreakpointType, java.lang.Object)

removeBreakpoint

public void removeBreakpoint(IModel model,
                             BreakpointType type,
                             java.lang.Object value)
Description copied from interface: IDebugController
remove a breakpoint

Specified by:
removeBreakpoint in interface IDebugController
See Also:
IDebugController.removeBreakpoint(org.jactr.core.model.IModel, org.jactr.core.runtime.controller.debug.BreakpointType, java.lang.Object)

isBreakpoint

public boolean isBreakpoint(IModel model,
                            BreakpointType type,
                            java.lang.Object value)
Description copied from interface: IDebugController
is this object a breakpoint

Specified by:
isBreakpoint in interface IDebugController
Returns:
See Also:
IDebugController.isBreakpoint(org.jactr.core.model.IModel, org.jactr.core.runtime.controller.debug.BreakpointType, java.lang.Object)