org.jclouds.compute.callables
Class RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete

java.lang.Object
  extended by org.jclouds.compute.callables.SudoAwareInitManager
      extended by org.jclouds.compute.callables.RunScriptOnNodeAsInitScriptUsingSsh
          extended by org.jclouds.compute.callables.RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete
All Implemented Interfaces:
Callable<ExecResponse>, RunScriptOnNode

public class RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete
extends RunScriptOnNodeAsInitScriptUsingSsh

Author:
Adrian Cole

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jclouds.compute.callables.RunScriptOnNode
RunScriptOnNode.Factory
 
Field Summary
protected  BlockUntilInitScriptStatusIsZeroThenReturnOutput.Factory statusFactory
           
protected  ComputeServiceConstants.Timeouts timeouts
           
 
Fields inherited from class org.jclouds.compute.callables.RunScriptOnNodeAsInitScriptUsingSsh
initFile, logger, PROPERTY_INIT_SCRIPT_PATTERN
 
Fields inherited from class org.jclouds.compute.callables.SudoAwareInitManager
computeLogger, init, node, runAsRoot, ssh, sshFactory
 
Constructor Summary
RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete(BlockUntilInitScriptStatusIsZeroThenReturnOutput.Factory statusFactory, ComputeServiceConstants.Timeouts timeouts, com.google.common.base.Function<NodeMetadata,SshClient> sshFactory, NodeMetadata node, Statement script, RunScriptOptions options)
           
 
Method Summary
 ExecResponse doCall()
           
 BlockUntilInitScriptStatusIsZeroThenReturnOutput future()
           
 RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete init()
          verifies that the command can execute on the node.
 
Methods inherited from class org.jclouds.compute.callables.RunScriptOnNodeAsInitScriptUsingSsh
call, createInitScript, refreshSshIfNewAdminCredentialsConfigured, setupLinkToInitFile
 
Methods inherited from class org.jclouds.compute.callables.SudoAwareInitManager
execScriptAsDefaultUser, getNode, getStatement, refreshAndRunAction, runAction, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jclouds.compute.callables.RunScriptOnNode
getNode, getStatement
 

Field Detail

timeouts

protected final ComputeServiceConstants.Timeouts timeouts

statusFactory

protected final BlockUntilInitScriptStatusIsZeroThenReturnOutput.Factory statusFactory
Constructor Detail

RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete

@Inject
public RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete(BlockUntilInitScriptStatusIsZeroThenReturnOutput.Factory statusFactory,
                                                                       ComputeServiceConstants.Timeouts timeouts,
                                                                       com.google.common.base.Function<NodeMetadata,SshClient> sshFactory,
                                                                       NodeMetadata node,
                                                                       Statement script,
                                                                       RunScriptOptions options)
Method Detail

doCall

public ExecResponse doCall()
Overrides:
doCall in class RunScriptOnNodeAsInitScriptUsingSsh

future

public BlockUntilInitScriptStatusIsZeroThenReturnOutput future()

init

public RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete init()
Description copied from interface: RunScriptOnNode
verifies that the command can execute on the node. For example, if this is ssh, it may attempt to find a reachable socket. If this is using an API, it may attempt to validate that connection.

Specified by:
init in interface RunScriptOnNode
Overrides:
init in class RunScriptOnNodeAsInitScriptUsingSsh


Copyright © 2009-2011 jclouds. All Rights Reserved.