com.waveset.provision
Class ResourcePasswordContext

java.lang.Object
  extended bycom.waveset.provision.ThreadContext
      extended bycom.waveset.provision.FetchContext
          extended bycom.waveset.provision.ResourcePasswordContext

public class ResourcePasswordContext
extends FetchContext

A class holding the runtime state for a resource password update


Field Summary
static java.lang.String code_id
           
 
Fields inherited from class com.waveset.provision.ThreadContext
trace
 
Constructor Summary
ResourcePasswordContext(Provisioner p, ProvisioningOptions options)
           
 
Method Summary
 void buildResourceOps()
          Build a base list of "resource operation" objects for each resource whose connection accounts are to be modified.
 ResourceOp getNextOp()
          Return the next operation that a thread can perform.
 void prepare()
          Make any last minute preparations before launching.
 void processOp(ResourceOp op, int thread)
          Called by each thread after it has obtained an operation to perform.
 void updateResourcePassword(ResourceOp op, int thread)
          This is the inner implementation of the update resource account password operation.
 
Methods inherited from class com.waveset.provision.FetchContext
doFetch, getDesiredThreads, getOps, getResults, init, isFinished
 
Methods inherited from class com.waveset.provision.ThreadContext
buildResourceUser, buildResourceUser, checkAdapters, generateIdentities, getAdministratorName, getExplicitIdentity, getOp, getOptions, getProvisioner, getUser, getUserName, launchThreads, normalizeResourceInfos, overrideResourceAttributes, println, setTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values
Constructor Detail

ResourcePasswordContext

public ResourcePasswordContext(Provisioner p,
                               ProvisioningOptions options)
Method Detail

prepare

public void prepare()
             throws WavesetException
Make any last minute preparations before launching.

Overrides:
prepare in class FetchContext
Throws:
WavesetException

getNextOp

public ResourceOp getNextOp()
Return the next operation that a thread can perform. This needs to be synchronized since it will be called by multiple threads. If null is returned, that doesn't necessarily mean we're finished, we may be waititng for dependent operations to finish.

Overrides:
getNextOp in class FetchContext

processOp

public void processOp(ResourceOp op,
                      int thread)
               throws WavesetException
Called by each thread after it has obtained an operation to perform. This method must not be synchronized, all the state we need should be in the provided ResourceOp object.

Overrides:
processOp in class FetchContext
Throws:
WavesetException

buildResourceOps

public void buildResourceOps()
                      throws WavesetException
Build a base list of "resource operation" objects for each resource whose connection accounts are to be modified.

Overrides:
buildResourceOps in class FetchContext
Throws:
WavesetException

updateResourcePassword

public void updateResourcePassword(ResourceOp op,
                                   int thread)
                            throws WavesetException
This is the inner implementation of the update resource account password operation. It will be called by each fetch thread as they iterate over the op list.

This method must not be synchronized, all state is maintained in the ResourceOp. Modifications should only be made in the ResourceInfo that is associated with this resource.

Throws:
WavesetException