net.java.dev.vcc.ant
Class AbstractComputerActionTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by net.java.dev.vcc.ant.AbstractDatacenterTask
              extended by net.java.dev.vcc.ant.AbstractComputerActionTask
Direct Known Subclasses:
PauseComputerTask, StartComputerTask, StopComputerTask, SuspendComputerTask

public abstract class AbstractComputerActionTask
extends AbstractDatacenterTask

Created by IntelliJ IDEA. User: connollys Date: Aug 11, 2009 Time: 3:42:14 PM To change this template use File | Settings | File Templates.


Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
AbstractComputerActionTask()
           
 
Method Summary
 void addConfiguredComputer(ComputerElement aComputer)
           
protected abstract  java.util.concurrent.Future<net.java.dev.vcc.api.Success> doAction(net.java.dev.vcc.api.Computer computer)
          Preforms the operation on the specified computer, returning a future for completion of the operation.
protected  void execute(net.java.dev.vcc.api.Datacenter datacenter)
          Execute the task on the specified datacenter.
 int getTimeout()
           
protected abstract  void recordFailure(java.lang.String name)
          Records that the operation on the named computer failed.
protected abstract  void recordSuccess(java.lang.String name)
          Records that the operation on the named computer succeeded.
 void setTimeout(int timeout)
           
 
Methods inherited from class net.java.dev.vcc.ant.AbstractDatacenterTask
execute, getDatacenteruri, getPassword, getUsername, setDatacenteruri, setPassword, setUsername
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractComputerActionTask

public AbstractComputerActionTask()
Method Detail

execute

protected final void execute(net.java.dev.vcc.api.Datacenter datacenter)
                      throws org.apache.tools.ant.BuildException
Execute the task on the specified datacenter.

Specified by:
execute in class AbstractDatacenterTask
Parameters:
datacenter - The datacenter connection.
Throws:
org.apache.tools.ant.BuildException - when things go bad.

recordFailure

protected abstract void recordFailure(java.lang.String name)
Records that the operation on the named computer failed.

Parameters:
name - The computer name.
Since:
1.0-alpha-1

recordSuccess

protected abstract void recordSuccess(java.lang.String name)
Records that the operation on the named computer succeeded.

Parameters:
name - The computer name.
Since:
1.0-alpha-1

doAction

protected abstract java.util.concurrent.Future<net.java.dev.vcc.api.Success> doAction(net.java.dev.vcc.api.Computer computer)
Preforms the operation on the specified computer, returning a future for completion of the operation.

Parameters:
computer - The computer.
Returns:
A future for completion of the operation.
Since:
1.0-alpha-1

getTimeout

public final int getTimeout()

setTimeout

public final void setTimeout(int timeout)

addConfiguredComputer

public final void addConfiguredComputer(ComputerElement aComputer)


Copyright © 2009. All Rights Reserved.