Package cmion.level2.competencies
Class Migration
java.lang.Object
ion.Meta.Element
cmion.architecture.CmionComponent
cmion.level2.Competency
cmion.level2.competencies.Migration
- All Implemented Interfaces:
Runnable
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class cmion.level2.Competency
available, competencyName, competencyType, plan, runningFields inherited from class cmion.architecture.CmionComponent
architecture -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMigrationData(Element xmlElement) protected booleancompetencyCode(HashMap<String, String> parameters) every competency sub class must implement this method and in it perform the competency code.protected SynchronizergetNewSynchronizer(int listenPort) voidimportConfig(Document doc) voidcustom competency initialisation code should go in herebooleanprotected InputStreamopenConfigFile(String configFile) This method is responsible for opening the configuration file correctly.final voidregisters request and event handlers of the competency execution system, if overridden, remember to call super.registerHandlers(); from withinbooleanevery 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)Methods inherited from class cmion.level2.Competency
cancel, getCompetencyName, getCompetencyType, isAvailable, isRunning, requestStartCompetency, run, setAdditionalDataMethods inherited from class cmion.architecture.CmionComponent
getArchitecture, isConnected, onDestroy, raiseMethods inherited from class ion.Meta.Element
destroy, getEventFilters, getEventHandlers, getRequestFilters, getRequestHandlers, getSimulation, getUID, schedule, wasDestroyed
-
Field Details
-
SUCCESS_TAG
- See Also:
-
-
Constructor Details
-
Migration
-
-
Method Details
-
openConfigFile
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:Competencycustom competency initialisation code should go in here- Specified by:
initializein classCompetency
-
getNewSynchronizer
protected Synchronizer getNewSynchronizer(int listenPort) throws IOException, ParserConfigurationException -
registerHandlers
public final void registerHandlers()Description copied from class:Competencyregisters request and event handlers of the competency execution system, if overridden, remember to call super.registerHandlers(); from within- Overrides:
registerHandlersin classCompetency
-
runsInBackground
public boolean runsInBackground()Description copied from class:Competencyevery 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:
runsInBackgroundin classCompetency
-
competencyCode
Description copied from class:Competencyevery 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:
competencyCodein classCompetency- 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
-
getDeviceList
-
getAllDevices
-
getAvailableDevices
-
importConfig
-
isOccupied
public boolean isOccupied()
-