Package net.simplace.sim.io.interfaces
Class JSONInterface
java.lang.Object
net.simplace.sim.io.interfaces.FWSimInterface<JSONDataContainer>
net.simplace.sim.io.interfaces.JSONInterface
implementation of the using ConnectionPool
giving access to resources from and output to Databases
use by
FWSimInterfaceFWSimInterface.getInterface(FWSimVarMap, CONTENT_TYPE).createStatement();
Make sure to free connections after use by calling
ConnectionPoolManager#getInstance#freeConnection(Connection)- Author:
- Andreas Enders
-
Nested Class Summary
Nested classes/interfaces inherited from class net.simplace.sim.io.interfaces.FWSimInterface
FWSimInterface.INTERFACE_TYPE -
Field Summary
FieldsFields inherited from class net.simplace.sim.io.interfaces.FWSimInterface
iColumnMap, iColumnNamesInt, iIntColumnNames -
Constructor Summary
ConstructorsModifierConstructorDescriptionJSONInterface(String aName, String aURL, String aPath, String aVarName) protectedJSONInterface(String aName, FWSimInterface.INTERFACE_TYPE aInterfaceType, int aPoolSize) Constructor has to be called from implementing interfacesprotectedJSONInterface(String aName, org.jdom2.Element aInterfaceElement) -
Method Summary
Modifier and TypeMethodDescriptionvoidfinalize()getInterface(FWSimVarMap aVarMap, FWSimVariable.CONTENT_TYPE aContentType) getURL()read(FWSimSession aFwSimSession, String aProjectID, Object aCache, LinkedHashMap<String, String> aKeyMap, FWSimInputAdapter aResourceAdapter, String aUniqueID, FWSimInterface.INTERFACE_TYPE aInterfaceType) factory method creating an interface instance concerning the given data typevoidorg.jdom2.ElementtoXML()Methods inherited from class net.simplace.sim.io.interfaces.FWSimInterface
checkHeaderForColMode, createInterface, createInterface, createStatisticInterface, getInterfaceType, getName, getPoolSize, readColArray, toString, transformArrays, writeToDatabase
-
Field Details
-
iURL
-
iPath
-
iContent
-
-
Constructor Details
-
JSONInterface
Constructor has to be called from implementing interfaces- Parameters:
aName-aInterfaceType-aPath-aPoolSize-
-
JSONInterface
- Parameters:
aName-aPoolSize-aInterfaceElement-
-
JSONInterface
- Parameters:
aName-aURL-aPath-
-
-
Method Details
-
getInterface
- Specified by:
getInterfacein classFWSimInterface<JSONDataContainer>- Returns:
- generic interface connection object. for example: database - connection; xml - fileinfo
- See Also:
-
getURL
- Returns:
- the uRL
-
setURL
- Parameters:
aURL- the uRL to set
-
toXML
public org.jdom2.Element toXML()- Overrides:
toXMLin classFWSimInterface<JSONDataContainer>- Returns:
- Element containing configuration for this Interface
-
finalize
- Specified by:
finalizein classFWSimInterface<JSONDataContainer>- Throws:
Exception- See Also:
-
read
public FWSimResourceCache read(FWSimSession aFwSimSession, String aProjectID, Object aCache, LinkedHashMap<String, String> aKeyMap, FWSimInputAdapter aResourceAdapter, String aUniqueID, FWSimInterface.INTERFACE_TYPE aInterfaceType) throws MissingSimResourceExceptionDescription copied from class:FWSimInterfacefactory method creating an interface instance concerning the given data type- Specified by:
readin classFWSimInterface<JSONDataContainer>- Returns:
- generic
FWSimResourceCache - Throws:
MissingSimResourceException
-