Class 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
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.lang.Thread

        java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String argument  
      protected java.util.Collection<java.util.Map.Entry<java.lang.String,​ClifDeployDefinition>> bladeDefs  
      protected org.objectweb.fractal.api.Component serverComp  
      protected java.lang.String serverName  
      protected org.objectweb.fractal.api.Interface supervisorInfo  
      • Fields inherited from class java.lang.Thread

        MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
    • 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.Object futureExecution()
      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 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
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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 component
        serverName - the name of the target Clif server
        definitions - the collection of blade deployment definitions
        lock - 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.Exception
        Actually performs the blades deployment.
        Specified by:
        futureExecution in class Future
        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.Exception
        Gets 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