Package org.ow2.clif.deploy
Class BladeDeploy
- java.lang.Object
-
- java.lang.Thread
-
- org.ow2.clif.util.Future
-
- org.ow2.clif.deploy.BladeDeploy
-
- All Implemented Interfaces:
java.lang.Runnable
public class BladeDeploy extends Future
Asynchronously and remotely instantiates Blade components in one CLIF server and sets their arguments.- Author:
- Bruno Dillenseger
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Stringargumentprotected java.util.Collection<java.util.Map.Entry<java.lang.String,ClifDeployDefinition>>bladeDefsprotected org.objectweb.fractal.api.ComponentserverCompprotected java.lang.StringserverNameprotected org.objectweb.fractal.api.InterfacesupervisorInfo
-
Constructor Summary
Constructors Constructor Description BladeDeploy(java.lang.String serverName, org.objectweb.fractal.api.Component serverComp, java.util.Collection<java.util.Map.Entry<java.lang.String,ClifDeployDefinition>> definitions, java.lang.Object lock)Creates a thread dedicated to deploying a collection of blades in a given CLIF server.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectfutureExecution()Actually performs the blades deployment.java.util.Map<java.lang.String,java.lang.Object>get()Gets the blade components (the call is blocked waiting for the blades to be actually deployed)java.util.Collection<java.util.Map.Entry<java.lang.String,ClifDeployDefinition>>getDefinitions()Gets the collection of blade definitions this instance is supposed to deploy.-
Methods inherited from class org.ow2.clif.util.Future
futureGet, isComplete, run
-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Field Detail
-
supervisorInfo
protected org.objectweb.fractal.api.Interface supervisorInfo
-
serverComp
protected org.objectweb.fractal.api.Component serverComp
-
serverName
protected java.lang.String serverName
-
argument
protected java.lang.String argument
-
bladeDefs
protected java.util.Collection<java.util.Map.Entry<java.lang.String,ClifDeployDefinition>> bladeDefs
-
-
Constructor Detail
-
BladeDeploy
public BladeDeploy(java.lang.String serverName, org.objectweb.fractal.api.Component serverComp, java.util.Collection<java.util.Map.Entry<java.lang.String,ClifDeployDefinition>> definitions, java.lang.Object lock)Creates a thread dedicated to deploying a collection of blades in a given CLIF server. This thread must be started in order deployment to actually start. Then, the get() method will deliver the deployment results.- Parameters:
serverComp- the target Clif server componentserverName- the name of the target Clif serverdefinitions- the collection of blade deployment definitionslock- a lock object that will be notified once deployment process is complete. May be null if this synchronization feature is not wanted.- See Also:
get()
-
-
Method Detail
-
futureExecution
public java.lang.Object futureExecution() throws java.lang.ExceptionActually performs the blades deployment.- Specified by:
futureExecutionin classFuture- Returns:
- the task result, of arbitrary type.
- Throws:
java.lang.Exception- the task could not complete.
-
get
public java.util.Map<java.lang.String,java.lang.Object> get() throws java.lang.ExceptionGets the blade components (the call is blocked waiting for the blades to be actually deployed)- Returns:
- a Map of blade id / blade component or exception entries
- Throws:
java.lang.Exception
-
getDefinitions
public java.util.Collection<java.util.Map.Entry<java.lang.String,ClifDeployDefinition>> getDefinitions()
Gets the collection of blade definitions this instance is supposed to deploy.- Returns:
- the blade definitions, as given at this object creation
-
-