Class FWSimSyncAdapter
java.lang.Object
net.simplace.sim.io.FWSimIOAdapter
net.simplace.sim.io.sync.FWSimSyncAdapter
- All Implemented Interfaces:
FWSimFieldContainer
Base class of synchronisation adapters for synchronized projects: when all simulations of a synchronized project
wait,
FWSimSyncManager.sync(Map) is called with their variable maps, so the adapters can exchange data
between the simulations. Subclasses need a public constructor
(FWSimSession, Element, Integer). Currently there are no implementations.- Author:
- aenders
-
Nested Class Summary
Nested classes/interfaces inherited from class FWSimIOAdapter
FWSimIOAdapter.FREQUENCE -
Field Summary
Fields inherited from class FWSimIOAdapter
iArrayMode, iFieldcount, iFrequence, iHeaderVariables, iInterface, iJexlRule, iKeyMap, iName, iOrderNumber, iProcessTime, iResourceElement, iSession, iSourceKey -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFWSimSyncAdapter(FWSimSession aSession, org.jdom2.Element aSyncElement, Integer aOrderNumber) -
Method Summary
Modifier and TypeMethodDescriptionprotected static FWSimSyncAdaptercreateSyncAdapter(FWSimSession aSession, org.jdom2.Element aSyncElement, int aOrderNumber) Instantiates the adapter class given in the attributeclassof the element by reflection.always returning empty list because this adapters are not meant to receive input datareturning the variables from the header informationabstract FWSimResourceCachesync(Map<String, FWSimVarMap> aVarMapsContainer) Synchronises the waiting simulations.org.jdom2.ElementtoXML()Methods inherited from class FWSimIOAdapter
addProcessTime, addVariable, checkCondition, createFormFields, createVariables, finalize, getCreateFormXML, getEditFormXML, getFieldMap, getFrequence, getHeaderVariables, getHeaderXML, getInterface, getJexlRule, getKeyMap, getName, getOrderNumber, getVariable, isArrayMode, isConditionCheck, removeVariable, setFrequenceAndRule, setInterface, setOrderNumber, toString, writeHeaderList
-
Constructor Details
-
FWSimSyncAdapter
protected FWSimSyncAdapter(FWSimSession aSession, org.jdom2.Element aSyncElement, Integer aOrderNumber) - Parameters:
aSession- the sessionaSyncElement- the XML element describing the adapteraOrderNumber- position of the adapter in the order of execution
-
-
Method Details
-
createSyncAdapter
protected static FWSimSyncAdapter createSyncAdapter(FWSimSession aSession, org.jdom2.Element aSyncElement, int aOrderNumber) Instantiates the adapter class given in the attributeclassof the element by reflection.- Parameters:
aSession- the sessionaSyncElement- the XML element describing the adapteraOrderNumber- position of the adapter in the order of execution- Returns:
- the new adapter, or
nullif the class is abstract or cannot be instantiated (error is logged)
-
sync
Synchronises the waiting simulations.- Parameters:
aVarMapsContainer- variable maps of the simulations of the project, by simulation id- Returns:
- cache with the synchronised data
-
getOutputVariables
returning the variables from the header information- Returns:
- the output variables of the field map
- See Also:
-
getInputVariables
always returning empty list because this adapters are not meant to receive input data- Returns:
- the input variables of the field map
- See Also:
-
getContentType
- Returns:
- the content type of the variables of this container (e.g.
sys,mgm) - See Also:
-
getJexlScript
- Returns:
- the rule script of the adapter, compiled on first call
-
getVarMap
- Returns:
- the var map this container belongs to
-
toXML
public org.jdom2.Element toXML()- Returns:
- an XML element with all settings of this container
-