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
FWSimInterface
FWSimInterface.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
Fields inherited from class net.simplace.sim.io.interfaces.FWSimInterface
iColumnMap, iColumnNamesInt, iIntColumnNames
-
Constructor Summary
ModifierConstructorDescriptionJSONInterface
(String aName, String aURL, String aPath, String aVarName) protected
JSONInterface
(String aName, FWSimInterface.INTERFACE_TYPE aInterfaceType, int aPoolSize) Constructor has to be called from implementing interfacesprotected
JSONInterface
(String aName, org.jdom2.Element aInterfaceElement) -
Method Summary
Modifier and TypeMethodDescriptionvoid
finalize()
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 typevoid
org.jdom2.Element
toXML()
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:
getInterface
in 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:
toXML
in classFWSimInterface<JSONDataContainer>
- Returns:
- Element containing configuration for this Interface
-
finalize
- Specified by:
finalize
in 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:FWSimInterface
factory method creating an interface instance concerning the given data type- Specified by:
read
in classFWSimInterface<JSONDataContainer>
- Returns:
- generic
FWSimResourceCache
- Throws:
MissingSimResourceException
-