Class Controller
java.lang.Object
mastermicro.topologies.controller.Controller
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteTopology
(String id) Get the the topologies that exists.void
readTopologyFromFile
(String jsonFilePath) Read a topology from a json file, and store it in the memory.void
writeTopologyToFile
(String topologyId, String jsonFilePath) Write a topology (by its id) to a json file.
-
Constructor Details
-
Controller
public Controller()
-
-
Method Details
-
getTopologies
Get the the topologies that exists. Not to be confused by the topologies stored in files, I mean the topologies in the memory.- Returns:
- array list of the topologies
-
deleteTopology
-
readTopologyFromFile
Read a topology from a json file, and store it in the memory.- Parameters:
jsonFilePath
- a relative or full path to the json file.- Throws:
FileNotFoundException
-
writeTopologyToFile
Write a topology (by its id) to a json file.- Parameters:
topologyId
- the topology id.jsonFilePath
- a relative or full path to the json file.- Throws:
IOException
-