org.jclouds.compute.options
Class RunScriptOptions.ImmutableRunScriptOptions

java.lang.Object
  extended by org.jclouds.compute.options.RunScriptOptions
      extended by org.jclouds.compute.options.RunScriptOptions.ImmutableRunScriptOptions
Enclosing class:
RunScriptOptions

public static class RunScriptOptions.ImmutableRunScriptOptions
extends RunScriptOptions


Nested Class Summary
 
Nested classes/interfaces inherited from class org.jclouds.compute.options.RunScriptOptions
RunScriptOptions.Builder, RunScriptOptions.ImmutableRunScriptOptions
 
Field Summary
 
Fields inherited from class org.jclouds.compute.options.RunScriptOptions
blockOnComplete, NONE, overridingCredentials, port, runAsRoot, seconds, taskName, wrapInInitScript
 
Constructor Summary
RunScriptOptions.ImmutableRunScriptOptions(RunScriptOptions delegate)
           
 
Method Summary
 RunScriptOptions blockOnComplete(boolean blockOnComplete)
          As of version 1.1.0, we cannot kick off a script unless a node is in RUNNING state.
 RunScriptOptions blockOnPort(int port, int seconds)
          When the node is started, wait until the following port is active
 Credentials getOverridingCredentials()
          Whether to override the credentials with ones supplied in call to org.jclouds.compute.ComputeService#runScriptOnNodesWithTag.
 int getPort()
           
 int getSeconds()
           
 String getTaskName()
           
 RunScriptOptions nameTask(String name)
           
 RunScriptOptions overrideCredentialsWith(Credentials overridingCredentials)
           
 RunScriptOptions overrideLoginCredentialWith(String loginCredential)
           
 RunScriptOptions overrideLoginUserWith(String loginUser)
           
 RunScriptOptions runAsRoot(boolean runAsRoot)
           
 boolean shouldBlockOnComplete()
           
 boolean shouldRunAsRoot()
          Whether to run the script as root (or run with current privileges).
 String toString()
           
 RunScriptOptions wrapInInitScript(boolean wrapInInitScript)
          default true

 
Methods inherited from class org.jclouds.compute.options.RunScriptOptions
shouldWrapInInitScript
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RunScriptOptions.ImmutableRunScriptOptions

public RunScriptOptions.ImmutableRunScriptOptions(RunScriptOptions delegate)
Method Detail

toString

public String toString()
Overrides:
toString in class RunScriptOptions

getOverridingCredentials

public Credentials getOverridingCredentials()
Description copied from class: RunScriptOptions
Whether to override the credentials with ones supplied in call to org.jclouds.compute.ComputeService#runScriptOnNodesWithTag. By default, true.

Overrides:
getOverridingCredentials in class RunScriptOptions
Returns:
value

shouldRunAsRoot

public boolean shouldRunAsRoot()
Description copied from class: RunScriptOptions
Whether to run the script as root (or run with current privileges). By default, true.

Overrides:
shouldRunAsRoot in class RunScriptOptions
Returns:
value

runAsRoot

public RunScriptOptions runAsRoot(boolean runAsRoot)
Overrides:
runAsRoot in class RunScriptOptions

shouldBlockOnComplete

public boolean shouldBlockOnComplete()
Overrides:
shouldBlockOnComplete in class RunScriptOptions
See Also:
RunScriptOptions.blockOnComplete(boolean)

blockOnComplete

public RunScriptOptions blockOnComplete(boolean blockOnComplete)
Description copied from class: RunScriptOptions
As of version 1.1.0, we cannot kick off a script unless a node is in RUNNING state.

Overrides:
blockOnComplete in class RunScriptOptions
Parameters:
blockOnComplete - (default true) false means kick off the script in the background, but don't wait for it to finish. (as of version 1.1.0, implemented as nohup)

overrideLoginUserWith

public RunScriptOptions overrideLoginUserWith(String loginUser)
Overrides:
overrideLoginUserWith in class RunScriptOptions

overrideLoginCredentialWith

public RunScriptOptions overrideLoginCredentialWith(String loginCredential)
Overrides:
overrideLoginCredentialWith in class RunScriptOptions

wrapInInitScript

public RunScriptOptions wrapInInitScript(boolean wrapInInitScript)
Description copied from class: RunScriptOptions
default true

Overrides:
wrapInInitScript in class RunScriptOptions
Parameters:
wrapInInitScript - if the command is long-running, use this option to ensure it is wrapInInitScripted properly. (ex. have jclouds wrap it an init script, nohup, etc)
Returns:

overrideCredentialsWith

public RunScriptOptions overrideCredentialsWith(Credentials overridingCredentials)
Overrides:
overrideCredentialsWith in class RunScriptOptions

getTaskName

public String getTaskName()
Overrides:
getTaskName in class RunScriptOptions

nameTask

public RunScriptOptions nameTask(String name)
Overrides:
nameTask in class RunScriptOptions
Returns:
What to call the task relating to this script; default jclouds-script-timestamp where timestamp is millis since epoch

blockOnPort

public RunScriptOptions blockOnPort(int port,
                                    int seconds)
Description copied from class: RunScriptOptions
When the node is started, wait until the following port is active

Overrides:
blockOnPort in class RunScriptOptions

getPort

public int getPort()
Overrides:
getPort in class RunScriptOptions

getSeconds

public int getSeconds()
Overrides:
getSeconds in class RunScriptOptions


Copyright © 2009-2011 jclouds. All Rights Reserved.