net.sourceforge.groboutils.autodoc.v1.testserver
Interface Monitor

All Known Implementing Classes:
DefaultMonitor

public interface Monitor

Monitors the state of multiple tests through the creation, retrieval, and sending to a server of the TestData for a specific test. Instances will be in charge of pooling together events from a TestCorrelate.

This class itself is not a singleton, but each framework implementation should have only one Monitor. Hence, this is called a "pseudo-singleton".

A Monitor may have multiple tests being tested at the same time. However, each test must be uniquely identifiable through a TestInfo; if two tests execute at the same time with the same TestInfo, the monitor will identify them as the same test. Uniqueness is guaranteed through the TestInfo instances.

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

Method Summary
 void addTestData(TestInfo info)
          Adds a new TestData instance related to the given TestInfo.
 TestData getTestData(TestInfo info)
          Retrieves the data associated with the given TestInfo, as was created through addTestData( TestInfo ).
 void sendTestData(TestInfo info)
          Sends the TestData associated with info to the inner server, and removes the data from the inner cache.
 

Method Detail

addTestData

public void addTestData(TestInfo info)
Adds a new TestData instance related to the given TestInfo. If there already is a TestData for the given TestInfo, then an exception is thrown.

Parameters:
info - the unique test identifier to create a new TestData instance for.
Throws:
java.lang.IllegalStateException - if info is already been added without having been sent.
java.lang.IllegalArgumentException - if info is null.

getTestData

public TestData getTestData(TestInfo info)
Retrieves the data associated with the given TestInfo, as was created through addTestData( TestInfo ). If the info was never passed to the add method, then an exception is thrown.

Parameters:
info - the unique test identifier.
Returns:
the data for the given info.
Throws:
java.lang.IllegalStateException - if info has not been added, or has been removed through the send call.
java.lang.IllegalArgumentException - if info is null.

sendTestData

public void sendTestData(TestInfo info)
Sends the TestData associated with info to the inner server, and removes the data from the inner cache. If the info has not been added, then an exception is thrown.

Parameters:
info - the unique test identifier
Throws:
java.lang.IllegalStateException - if info has not been added, or has been removed through the send call.
java.lang.IllegalArgumentException - if info is null.


Copyright © 2001-2003 by The GroboUtils Project