org.jwalk.tool
Class ReportPublisher

java.lang.Object
  extended by org.jwalk.tool.ReportPublisher
All Implemented Interfaces:
java.util.EventListener, ReportListener

public class ReportPublisher
extends java.lang.Object
implements ReportListener

ReportPublisher implements the reporting of test results to the tester. ReportPublisher is an implementation of the ReportListener interface that is designed to work with the JWalkTester GUI. It handles many kinds of Report, including: ProtocolReport, AlgebraReport, StateReport, CycleReport and SummaryReport; and may be extended to handle other kinds of report.

Author:
Mihai-Gabriel Glont, Jonny Elliot, Anthony Simons

Constructor Summary
ReportPublisher(JWalkTester tester)
          Creates a ReportPublisher owned by a JWalkTester.
 
Method Summary
protected  void handle(AlgebraReport report)
          Publishes an AlgebraReport dispatched by a JWalker.
protected  void handle(CycleReport report)
          Publishes a CycleReport dispatched by a JWalker.
protected  void handle(ProtocolReport report)
          Publishes a ProtocolReport dispatched by a JWalker.
protected  void handle(StateReport report)
          Publishes a StateReport dispatched by a JWalker.
protected  void handle(SummaryReport report)
          Publishes a SummaryReport dispatched by a JWalker.
 void publish(ReportEvent event)
          Publishes a report dispatched by a JWalker.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportPublisher

public ReportPublisher(JWalkTester tester)
Creates a ReportPublisher owned by a JWalkTester. When this ReportPublisher pops up JOptionPane dialogs, these depend on the JWalkTester as their master frame.

Method Detail

publish

public void publish(ReportEvent event)
Publishes a report dispatched by a JWalker. Analyses the type of the Report in the event, calling a suitable handler to publish it. This method fulfils the contract of ReportListener.

Specified by:
publish in interface ReportListener
Parameters:
event - the ReportEvent dispatched by a JWalker.

handle

protected void handle(ProtocolReport report)
Publishes a ProtocolReport dispatched by a JWalker.


handle

protected void handle(AlgebraReport report)
Publishes an AlgebraReport dispatched by a JWalker.


handle

protected void handle(StateReport report)
Publishes a StateReport dispatched by a JWalker.


handle

protected void handle(CycleReport report)
Publishes a CycleReport dispatched by a JWalker.


handle

protected void handle(SummaryReport report)
Publishes a SummaryReport dispatched by a JWalker.