net.clackrouter.topology.core
Class TopologyManager

java.lang.Object
  extended by net.clackrouter.topology.core.TopologyManager

public class TopologyManager
extends java.lang.Object

Controls loading routers from different topology files and cleaning up on close.

Owns a hashtable of different TopologyModel objects, associated with their respective topology number. Can parse a topology node, adds each router specified by the file.


Field Summary
static int NO_TOPOLOGY
           
 
Constructor Summary
TopologyManager(ClackFramework gp)
           
 
Method Summary
 void closeAllConnections()
           
 void configureTopoModelFromXML(java.io.InputStream is)
           
 Router getRouterByName(java.lang.String name)
           
static org.w3c.dom.Element getTopologyElementFromVNS(java.lang.String vns_server, int topology)
           
 TopologyModel getTopologyModel(int topology, org.w3c.dom.Element clack_element)
           
static TopologyModel getTopologyModelFromXML(int topology, org.w3c.dom.Element clack_element, boolean debug)
           
 java.lang.String getTopologyRangeString(int topology)
          Gives a string representation of the topology range used to load a given topology from the configuration file (this is used when serializing topologies).
 void reloadTopologyFile(int new_topo)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_TOPOLOGY

public static int NO_TOPOLOGY
Constructor Detail

TopologyManager

public TopologyManager(ClackFramework gp)
Method Detail

getTopologyModel

public TopologyModel getTopologyModel(int topology,
                                      org.w3c.dom.Element clack_element)
                               throws java.lang.Exception
Throws:
java.lang.Exception

getTopologyModelFromXML

public static TopologyModel getTopologyModelFromXML(int topology,
                                                    org.w3c.dom.Element clack_element,
                                                    boolean debug)
                                             throws java.lang.Exception
Throws:
java.lang.Exception

getTopologyElementFromVNS

public static org.w3c.dom.Element getTopologyElementFromVNS(java.lang.String vns_server,
                                                            int topology)
                                                     throws java.lang.Exception
Throws:
java.lang.Exception

configureTopoModelFromXML

public void configureTopoModelFromXML(java.io.InputStream is)
                               throws java.lang.Exception
Throws:
java.lang.Exception

reloadTopologyFile

public void reloadTopologyFile(int new_topo)
                        throws java.lang.Exception
Throws:
java.lang.Exception

closeAllConnections

public void closeAllConnections()

getTopologyRangeString

public java.lang.String getTopologyRangeString(int topology)
Gives a string representation of the topology range used to load a given topology from the configuration file (this is used when serializing topologies).


getRouterByName

public Router getRouterByName(java.lang.String name)