net.sourceforge.groboutils.autodoc.v1.testserver
Class AbstractWriterServer

java.lang.Object
  extended bynet.sourceforge.groboutils.autodoc.v1.testserver.AbstractWriterServer
All Implemented Interfaces:
Server
Direct Known Subclasses:
AbstractAppendFileServer, AbstractNewFileServer

public abstract class AbstractWriterServer
extends java.lang.Object
implements Server

An interface which corresponds to a part of the framework that knows how to deal with the framework's TestData. It may directly deal with the data, or pass it off to a remote server.

Since:
March 30, 2002
Version:
$Date: 2003/02/10 22:52:13 $
Author:
Matt Albrecht groboclown@users.sourceforge.net

Constructor Summary
AbstractWriterServer()
           
 
Method Summary
 void addTestData(TestData td)
          Receives td from a Monitor and handles it in an implementation specific manner.
protected  void closeOutput(java.io.Writer w)
          Close the given Writer, which was opened in the openOutput() method.
protected abstract  java.io.Writer openOutput(TestData td)
          Open a writer stream.
protected abstract  void writeTestData(TestData td, java.io.Writer w)
          Write the BugTestResult with all the result's encountered BugTestLog events.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractWriterServer

public AbstractWriterServer()
Method Detail

addTestData

public void addTestData(TestData td)
Receives td from a Monitor and handles it in an implementation specific manner.

Specified by:
addTestData in interface Server
Parameters:
td - the data to deal with.

writeTestData

protected abstract void writeTestData(TestData td,
                                      java.io.Writer w)
                               throws java.io.IOException
Write the BugTestResult with all the result's encountered BugTestLog events.

Throws:
java.io.IOException

openOutput

protected abstract java.io.Writer openOutput(TestData td)
                                      throws java.io.IOException
Open a writer stream. This will be done once per result, so log-like actions may need to append to the previous results.

Throws:
java.io.IOException

closeOutput

protected void closeOutput(java.io.Writer w)
                    throws java.io.IOException
Close the given Writer, which was opened in the openOutput() method. Since nearly all implementations will be the same, the default implementation simply executes w.close().

Throws:
java.io.IOException


Copyright © 2001-2003 by The GroboUtils Project