Class Controller

java.lang.Object
mastermicro.topologies.controller.Controller

public class Controller extends Object
  • Constructor Details

    • Controller

      public Controller()
  • Method Details

    • getTopologies

      public ArrayList<Topology> 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

      public void deleteTopology(String id)
    • readTopologyFromFile

      public void readTopologyFromFile(String jsonFilePath) throws FileNotFoundException
      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

      public void writeTopologyToFile(String topologyId, String jsonFilePath) throws IOException
      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