org.jclouds.compute.callables
Class BlockUntilInitScriptStatusIsZeroThenReturnOutput

java.lang.Object
  extended by com.google.common.util.concurrent.AbstractFuture<ExecResponse>
      extended by org.jclouds.compute.callables.BlockUntilInitScriptStatusIsZeroThenReturnOutput
All Implemented Interfaces:
com.google.common.util.concurrent.ListenableFuture<ExecResponse>, Future<ExecResponse>

public class BlockUntilInitScriptStatusIsZeroThenReturnOutput
extends com.google.common.util.concurrent.AbstractFuture<ExecResponse>

A future that works in tandem with a task that was invoked by InitBuilder

Author:
Adrian Cole

Nested Class Summary
static interface BlockUntilInitScriptStatusIsZeroThenReturnOutput.Factory
           
 
Field Summary
protected  Logger logger
           
 
Constructor Summary
BlockUntilInitScriptStatusIsZeroThenReturnOutput(ExecutorService userThreads, ScriptStatusReturnsZero stateRunning, SudoAwareInitManager commandRunner)
           
 
Method Summary
 boolean equals(Object obj)
           
 ExecResponse get(long timeout, TimeUnit unit)
           
 int hashCode()
           
protected  void interruptTask()
           
 void setSshClient(SshClient client)
          in case login credentials or user changes at runtime.
 String toString()
           
 
Methods inherited from class com.google.common.util.concurrent.AbstractFuture
addListener, cancel, cancel, done, get, isCancelled, isDone, set, setException
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

@Named(value="jclouds.compute")
protected Logger logger
Constructor Detail

BlockUntilInitScriptStatusIsZeroThenReturnOutput

@Inject
public BlockUntilInitScriptStatusIsZeroThenReturnOutput(@Named(value="jclouds.user-threads")
                                                               ExecutorService userThreads,
                                                               ScriptStatusReturnsZero stateRunning,
                                                               SudoAwareInitManager commandRunner)
Method Detail

setSshClient

public void setSshClient(SshClient client)
in case login credentials or user changes at runtime.


interruptTask

protected void interruptTask()
Overrides:
interruptTask in class com.google.common.util.concurrent.AbstractFuture<ExecResponse>

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

get

public ExecResponse get(long timeout,
                        TimeUnit unit)
                 throws InterruptedException,
                        TimeoutException,
                        ExecutionException
Specified by:
get in interface Future<ExecResponse>
Overrides:
get in class com.google.common.util.concurrent.AbstractFuture<ExecResponse>
Throws:
InterruptedException
TimeoutException
ExecutionException


Copyright © 2009-2011 jclouds. All Rights Reserved.