org.apache.whirr.service
Class ServiceFactory

java.lang.Object
  extended by org.apache.whirr.service.ServiceFactory

public class ServiceFactory
extends Object

This class is used to create Service instances.

Implementation note. Service implementations are discovered using a Service Provider Interface (SPI), described in ServiceLoader.


Constructor Summary
ServiceFactory()
           
 
Method Summary
 Set<String> availableServices()
          Return a collection of available services.
 Service create(String serviceName)
          Create an instance of a Service according to the given name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceFactory

public ServiceFactory()
Method Detail

create

public Service create(String serviceName)
Create an instance of a Service according to the given name. If the name is null then the default Service is returned.


availableServices

public Set<String> availableServices()
Return a collection of available services.

Returns:
the available service names


Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.