com.sun.faban.harness.services
Class ServiceManager

java.lang.Object
  extended by com.sun.faban.harness.services.ServiceManager

public class ServiceManager
extends Object

This class manages all the services.

Author:
Sheetal Patil

Constructor Summary
ServiceManager(ParamRepository par, Run run)
          Constructor.
 
Method Summary
 void configure()
          Configures the service.
static Set<String> getActiveDeployments()
          Obtains the set of active services and tools deployments used in the current run.
 void getConfig()
          Obtains the configuration of a service.
 void getLogs()
          Obtains the logs of a service.
 List<MasterToolContext> getTools()
          Returns a list of MasterToolContext.
 void parseServicesAndTools(String type, String dir)
          Parses a service/tool bundle.
 void parseToolSets(String type, String dir)
          Parses and creates the appropriate structures for the tool sets.
 void shutdown()
          Stops a service.
 void startup()
          Starts a service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceManager

public ServiceManager(ParamRepository par,
                      Run run)
               throws Exception
Constructor.

Parameters:
par -
run -
Throws:
Exception
Method Detail

getActiveDeployments

public static Set<String> getActiveDeployments()
Obtains the set of active services and tools deployments used in the current run.

Returns:
The set of active deployements or null if there is no current run

parseServicesAndTools

public void parseServicesAndTools(String type,
                                  String dir)
Parses a service/tool bundle.

Parameters:
type - The location type, services or benchmark
dir - The deploy jar name, without .jar

parseToolSets

public void parseToolSets(String type,
                          String dir)
Parses and creates the appropriate structures for the tool sets.

Parameters:
type - The location type, services or benchmark
dir - The deploy jar name, without .jar

getTools

public List<MasterToolContext> getTools()
Returns a list of MasterToolContext.

Returns:
List

configure

public void configure()
Configures the service.


getConfig

public void getConfig()
Obtains the configuration of a service.


getLogs

public void getLogs()
Obtains the logs of a service.


startup

public void startup()
Starts a service. If the service is marked for restart, this will shutdown the service and restart it.


shutdown

public void shutdown()
Stops a service.