rwth.i2.ltlrv.management.listeners
Class ConsoleListener

java.lang.Object
  extended by rwth.i2.ltlrv.management.listeners.ConsoleListener
All Implemented Interfaces:
VerificationRuntime.Listener

public class ConsoleListener
extends Object
implements VerificationRuntime.Listener


Constructor Summary
ConsoleListener()
           
 
Method Summary
 void notifyOnUserCauseException(String formulaId, Thread associatedThread, String ifExpression, Throwable exception, Configuration config)
          Notifies about a user-caused exception that happened during the evaluation of an if-pointcut.
 void notifyRegistered(String formulaId, Thread associatedThread, Configuration initialConfig)
          This is called whenever a new formula is registered.
 void notifyTearDown(String formulaId, Configuration config)
          This is called when the application is going down, so after the last main method has been executed.
 void notifyUpdate(String formulaId, Thread associatedThread, Configuration newConfig)
          This is called whenever a new formula is updated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsoleListener

public ConsoleListener()
Method Detail

notifyRegistered

public void notifyRegistered(String formulaId,
                             Thread associatedThread,
                             Configuration initialConfig)
This is called whenever a new formula is registered. This can happen basically any time but only once for each formula, since a formula is not registered before it is actually needed (first joinpoint).

Specified by:
notifyRegistered in interface VerificationRuntime.Listener
Parameters:
formulaId - the ID of the formula
associatedThread - the Thread which registered this formula
initialConfig - the initial configuration

notifyUpdate

public void notifyUpdate(String formulaId,
                         Thread associatedThread,
                         Configuration newConfig)
This is called whenever a new formula is updated. It may be the case that the new configuration is equal to the last one. No update will be triggered after a formula evaluated to TT or FF.

Specified by:
notifyUpdate in interface VerificationRuntime.Listener
Parameters:
formulaId - the ID of the formula
associatedThread - the Thread which registered this formula
newConfig - the new configuration

notifyTearDown

public void notifyTearDown(String formulaId,
                           Configuration config)
This is called when the application is going down, so after the last main method has been executed. For each formula the last configuration is passed. Formulas which evaluated to TT/FF before, will not be passed. It is up to the client to keep track of such formulae. IMPORTANT: This will be run from inside a shutdown hook. So be sure to invoke nothing which tries to modify shutdown hooks at this time. In particular, some AWT classes like Toolkit may do so.

Specified by:
notifyTearDown in interface VerificationRuntime.Listener

notifyOnUserCauseException

public void notifyOnUserCauseException(String formulaId,
                                       Thread associatedThread,
                                       String ifExpression,
                                       Throwable exception,
                                       Configuration config)
Notifies about a user-caused exception that happened during the evaluation of an if-pointcut. The formula will be removed from further evaluation. So no update for this formula will occur.

Specified by:
notifyOnUserCauseException in interface VerificationRuntime.Listener
Parameters:
formulaId - id of the formula which caused this exception
associatedThread - Thread that triggered the evaluation
ifExpression - expression that caused the exception
exception - exception that occured
config - last configuration before this exception occured