org.jboss.dtf.testframework.serviceregister
Interface ServiceRegisterInterface

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
ServiceRegister

public interface ServiceRegisterInterface
extends java.rmi.Remote

Interface exported by the ServiceRegister. The service register allows TestNodes to register the products it supports along with the OS it is running on. The coordinator can then query this register to find TestNodes which match given OS/Product criteria.


Method Summary
 void deregisterService(java.lang.String osId, TestNodeInterface testNodeReference)
          Removes a TestNode from the service register.
 void disableProductSupport(short serviceId, java.lang.String productId)
          Disable a given testnodes support for a given product.
 void enableProductSupport(short serviceId, java.lang.String productId)
          Enable a given testnodes support for a given product.
 TestNodeInterface[] getRegister()
          Get an array of all TestNode's registered
 TestNodeInterface lookupService(short serviceId)
          Return the TestNodeInterface for the TestNode that is registered with the given unique id
 TestNodeInterface[] lookupService(java.lang.String osId, java.lang.String product)
          Search the service register for TestNodes which are running on the given OS and supporting the product given.
 short registerService(java.lang.String osId, java.lang.String[] productList, TestNodeInterface testNodeReference)
          Adds a TestNode into the service register.
 void reregisterService(short serviceId, java.lang.String[] productList)
          Updates a TestNode in the service register.
 

Method Detail

registerService

short registerService(java.lang.String osId,
                      java.lang.String[] productList,
                      TestNodeInterface testNodeReference)
                      throws java.rmi.RemoteException
Adds a TestNode into the service register.

Parameters:
osId - The string id. for the OS the TestNode is running on.
productList - An array of product id.'s that the TestNode supports.
testNodeReference - The object reference of the TestNode.
Throws:
java.rmi.RemoteException

reregisterService

void reregisterService(short serviceId,
                       java.lang.String[] productList)
                       throws java.rmi.RemoteException,
                              ServiceNotFound
Updates a TestNode in the service register.

Parameters:
productList - An array of product id.'s that the TestNode supports.
Throws:
java.rmi.RemoteException
ServiceNotFound

lookupService

TestNodeInterface[] lookupService(java.lang.String osId,
                                  java.lang.String product)
                                  throws java.rmi.RemoteException,
                                         ServiceNotFound
Search the service register for TestNodes which are running on the given OS and supporting the product given.

Parameters:
osID - The string id. for the OS the TestNode should be running on.
product - The string id. for the product the TestNode should support.
Throws:
ServiceNotFound - Thrown if a TestNode cannot be found which supports the given OS/Product combination.
java.rmi.RemoteException

lookupService

TestNodeInterface lookupService(short serviceId)
                                throws java.rmi.RemoteException,
                                       ServiceNotFound
Return the TestNodeInterface for the TestNode that is registered with the given unique id

Parameters:
serviceId - The unique service identifier
Throws:
java.rmi.RemoteException
ServiceNotFound

getRegister

TestNodeInterface[] getRegister()
                                throws java.rmi.RemoteException
Get an array of all TestNode's registered

Throws:
java.rmi.RemoteException

deregisterService

void deregisterService(java.lang.String osId,
                       TestNodeInterface testNodeReference)
                       throws java.rmi.RemoteException,
                              ServiceNotFound
Removes a TestNode from the service register.

Parameters:
testNodeReference - The object reference of the TestNode to remove.
Throws:
ServiceNotFound - Thrown if the object reference isn't one of a known TestNode.
java.rmi.RemoteException

disableProductSupport

void disableProductSupport(short serviceId,
                           java.lang.String productId)
                           throws java.rmi.RemoteException,
                                  ServiceNotFound
Disable a given testnodes support for a given product. This is used by a testnode so that it can continue receiving deployments without being involved in test runs. This will usually occur when a test node fails to deploy a product.

Parameters:
serviceId - The service id. of the testnode who's product support is to be altered.
productId - The name of the product to disable support of.
Throws:
java.rmi.RemoteException
ServiceNotFound

enableProductSupport

void enableProductSupport(short serviceId,
                          java.lang.String productId)
                          throws java.rmi.RemoteException,
                                 ServiceNotFound
Enable a given testnodes support for a given product. This is used by a testnode so that it will be involved in test runs.

Parameters:
serviceId - The service id. of the testnode who's product support is to be altered.
productId - The name of the product to disable support of.
Throws:
java.rmi.RemoteException
ServiceNotFound