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

public abstract class AbstractClusterSpecCommand
extends Command

An abstract command for interacting with clusters.


Field Summary
protected  ServiceFactory factory
           
protected  joptsimple.OptionParser parser
           
 
Constructor Summary
AbstractClusterSpecCommand(String name, String description, ServiceFactory factory)
           
 
Method Summary
protected  Service createService(String serviceName)
          Create the specified service
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 ServiceFactory factory

parser

protected joptsimple.OptionParser parser
Constructor Detail

AbstractClusterSpecCommand

public AbstractClusterSpecCommand(String name,
                                  String description,
                                  ServiceFactory factory)
Method Detail

getClusterSpec

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

createService

protected Service createService(String serviceName)
Create the specified service

Parameters:
serviceName -
Returns:
Throws:
IllegalArgumentException - if serviceName is not found


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