Class Migration

  • All Implemented Interfaces:
    java.lang.Runnable

    public class Migration
    extends Competency
    • Constructor Detail

      • Migration

        public Migration​(IArchitecture architecture,
                         java.lang.String configFile)
    • Method Detail

      • openConfigFile

        protected java.io.InputStream openConfigFile​(java.lang.String configFile)
        This method is responsible for opening the configuration file correctly. It should be different depending on the platform and the way it provides access to resources.
        Returns:
        InputStream for the configuration file of the migration competency.
      • initialize

        public void initialize()
        Description copied from class: Competency
        custom competency initialisation code should go in here
        Specified by:
        initialize in class Competency
      • getNewSynchronizer

        protected Synchronizer getNewSynchronizer​(int listenPort)
                                           throws java.io.IOException,
                                                  javax.xml.parsers.ParserConfigurationException
        Throws:
        java.io.IOException
        javax.xml.parsers.ParserConfigurationException
      • registerHandlers

        public final void registerHandlers()
        Description copied from class: Competency
        registers request and event handlers of the competency execution system, if overridden, remember to call super.registerHandlers(); from within
        Overrides:
        registerHandlers in class Competency
      • runsInBackground

        public boolean runsInBackground()
        Description copied from class: Competency
        every competency must provide information of whether it will run in the background permanently (returns true) or whether it will be invoked through the competency execution system (returns false)
        Specified by:
        runsInBackground in class Competency
      • competencyCode

        protected boolean competencyCode​(java.util.HashMap<java.lang.String,​java.lang.String> parameters)
        Description copied from class: Competency
        every competency sub class must implement this method and in it perform the competency code. This method will run in a seperate thread, so can take its time. It should not be called from outside, instead a request should be scheduled or the convenience function requestStartComptency of this class should be used
        Specified by:
        competencyCode in class Competency
        Parameters:
        parameters - a map including running parameters and their values
        Returns:
        the return value of this method should indicate, whether the competency execution was a success (true) or failure (false)
      • addMigrationData

        public void addMigrationData​(org.w3c.dom.Element xmlElement)
      • getDeviceList

        public java.util.Map<java.lang.String,​Migration.Device> getDeviceList()
      • getAvailableDevices

        public java.util.Set<Migration.Device> getAvailableDevices()
      • importConfig

        public void importConfig​(org.w3c.dom.Document doc)
      • isOccupied

        public boolean isOccupied()