uk.ac.starlink.plastic
Class HubTester

java.lang.Object
  extended byuk.ac.starlink.plastic.HubTester

public class HubTester
extends Object

Runs tests on an existing PlasticHubListener object. The easiest way to use this class is to call one of the static methods main(java.lang.String[]), testHub() or testHub(org.votech.plastic.PlasticHubListener).

Since:
4 Aug 2006
Author:
Mark Taylor

Constructor Summary
HubTester(PlasticHubListener hub)
          Constructor.
 
Method Summary
 void dispose()
          Disposes of this tester, clearing up as appropriate.
 void exerciseHub()
          Runs most of the actual tests.
 PlasticHubListener getHub()
          Returns hub object with which this tester is registered.
 URI getId()
          Returns the registered client ID for this tester.
static void main(String[] args)
          Runs tests on a currently running hub.
static void testHub()
          Tests the currently running hub.
static void testHub(PlasticHubListener hub)
          Tests a given hub object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HubTester

public HubTester(PlasticHubListener hub)
          throws HubTestException
Constructor.

Parameters:
hub - hub to test
Method Detail

getId

public URI getId()
Returns the registered client ID for this tester.

Returns:
client ID

getHub

public PlasticHubListener getHub()
Returns hub object with which this tester is registered.

Returns:
hub

dispose

public void dispose()
             throws HubTestException
Disposes of this tester, clearing up as appropriate.

Throws:
HubTestException

exerciseHub

public void exerciseHub()
                 throws HubTestException
Runs most of the actual tests.

Throws:
HubTestException

testHub

public static void testHub()
                    throws HubTestException
Tests the currently running hub.

Throws:
HubTestException - if the hub is faulty, or if no hub is running

testHub

public static void testHub(PlasticHubListener hub)
                    throws HubTestException
Tests a given hub object.

Throws:
HubTestException - if the hub is faulty

main

public static void main(String[] args)
                 throws HubTestException
Runs tests on a currently running hub.

Flags

-help
Prints a help message and exits.

Throws:
HubTestException - if no hub is running, or if the hub fails any of the tests


Copyright © 2006 \\ CLRC: Central Laboratory of the Research Councils. All Rights Reserved.