org.apache.whirr.cli.command
Class AbstractClusterSpecCommand

java.lang.Object
  extended by org.apache.whirr.cli.Command
      extended by org.apache.whirr.cli.command.AbstractClusterSpecCommand
Direct Known Subclasses:
DestroyClusterCommand, DestroyInstanceCommand, LaunchClusterCommand, ListClusterCommand, RunScriptCommand

public abstract class AbstractClusterSpecCommand
extends Command

An abstract command for interacting with clusters.


Field Summary
protected  ClusterControllerFactory factory
           
protected  joptsimple.OptionParser parser
           
protected  ClusterStateStoreFactory stateStoreFactory
           
 
Constructor Summary
AbstractClusterSpecCommand(String name, String description, ClusterControllerFactory factory)
           
AbstractClusterSpecCommand(String name, String description, ClusterControllerFactory factory, ClusterStateStoreFactory stateStoreFactory)
           
 
Method Summary
protected  ClusterController createClusterController(String serviceName)
          Create the specified service
protected  ClusterStateStore createClusterStateStore(ClusterSpec spec)
           
protected  ClusterSpec getClusterSpec(joptsimple.OptionSet optionSet)
           
 
Methods inherited from class org.apache.whirr.cli.Command
getDescription, getName, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

protected ClusterControllerFactory factory

stateStoreFactory

protected ClusterStateStoreFactory stateStoreFactory

parser

protected joptsimple.OptionParser parser
Constructor Detail

AbstractClusterSpecCommand

public AbstractClusterSpecCommand(String name,
                                  String description,
                                  ClusterControllerFactory factory)

AbstractClusterSpecCommand

public AbstractClusterSpecCommand(String name,
                                  String description,
                                  ClusterControllerFactory factory,
                                  ClusterStateStoreFactory stateStoreFactory)
Method Detail

getClusterSpec

protected ClusterSpec getClusterSpec(joptsimple.OptionSet optionSet)
                              throws org.apache.commons.configuration.ConfigurationException
Throws:
org.apache.commons.configuration.ConfigurationException

createClusterController

protected ClusterController createClusterController(String serviceName)
Create the specified service


createClusterStateStore

protected ClusterStateStore createClusterStateStore(ClusterSpec spec)


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