org.apache.geronimo.deployment.cli
Class AbstractCommand

java.lang.Object
  extended by org.apache.geronimo.deployment.cli.AbstractCommand
All Implemented Interfaces:
DeployCommand
Direct Known Subclasses:
CommandDistribute, CommandInstallCAR, CommandInstallLibrary, CommandListConfigurations, CommandListModules, CommandListTargets, CommandLogin, CommandRedeploy, CommandStart

public abstract class AbstractCommand
extends Object
implements DeployCommand

Base class for CLI deployer commands. Tracks some simple properties and has common utility methods.


Constructor Summary
AbstractCommand()
           
 
Method Summary
protected  void emit(jline.ConsoleReader out, String message)
           
protected static Target[] identifyTargets(List targetNames, DeploymentManager mgr)
           
 boolean isLocalOnly()
           
protected static boolean isMultipleTargets(TargetModuleID[] ids)
           
protected  void waitForProgress(jline.ConsoleReader out, ProgressObject po)
          Busy-waits until the provided ProgressObject indicates that it's no longer running.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.geronimo.deployment.cli.DeployCommand
execute
 

Constructor Detail

AbstractCommand

public AbstractCommand()
Method Detail

isLocalOnly

public boolean isLocalOnly()
Specified by:
isLocalOnly in interface DeployCommand

emit

protected void emit(jline.ConsoleReader out,
                    String message)
             throws IOException
Throws:
IOException

waitForProgress

protected void waitForProgress(jline.ConsoleReader out,
                               ProgressObject po)
Busy-waits until the provided ProgressObject indicates that it's no longer running.

Parameters:
out - a PrintWriter value, only used in case of an InterruptedException to output the stack trace.
po - a ProgressObject value

isMultipleTargets

protected static boolean isMultipleTargets(TargetModuleID[] ids)

identifyTargets

protected static Target[] identifyTargets(List targetNames,
                                          DeploymentManager mgr)
                                   throws DeploymentException
Throws:
DeploymentException


Copyright © 2003-2008 The Apache Geronimo development community. All Rights Reserved.