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, 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(String message)
           
protected static Target[] identifyTargets(List targetNames, DeploymentManager mgr)
           
 boolean isLocalOnly()
           
protected static boolean isMultipleTargets(TargetModuleID[] ids)
           
 void setOut(PrintWriter out)
           
protected  void waitForProgress(PrintWriter 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

setOut

public void setOut(PrintWriter out)

emit

protected void emit(String message)

waitForProgress

protected void waitForProgress(PrintWriter 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-2007 Apache Software Foundation. All Rights Reserved.