Package io.patriot_framework.hub
Class PatriotHub
- java.lang.Object
-
- io.patriot_framework.hub.PatriotHub
-
public class PatriotHub extends Object
Entry interface to the Patriot Framework It contains all controlling APIs that are available to use The class implements singleton design pattern, which means there is always at most one PatriotHub within one JVM process
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deployApplication(Application app, String networkName, String tag)
void
deployApplication(Application app, String networkName, String tag, List<String> envVars)
void
deployTopology(Topology top)
void
destroyHub()
Method cleans up all resources and destroys its instanceApplication
getApplication(String name)
static PatriotHub
getInstance()
Singleton accessorManager
getManager()
Accessor to the simulators NetworkManager, which is main controlling interface for simulated networkDeviceRegistry
getRegistry()
void
setRegistry(DeviceRegistry registry)
-
-
-
Field Detail
-
log
public static Logger log
-
-
Method Detail
-
getRegistry
public DeviceRegistry getRegistry()
-
setRegistry
public void setRegistry(DeviceRegistry registry)
-
getInstance
public static PatriotHub getInstance() throws PropertiesNotLoadedException
Singleton accessor- Returns:
- PatriotHub instance, this cannot return null
- Throws:
PropertiesNotLoadedException
- when creation of instance fails due to missing property
-
deployTopology
public void deployTopology(Topology top)
-
deployApplication
public void deployApplication(Application app, String networkName, String tag, List<String> envVars)
-
deployApplication
public void deployApplication(Application app, String networkName, String tag)
-
getApplication
public Application getApplication(String name)
-
getManager
public Manager getManager()
Accessor to the simulators NetworkManager, which is main controlling interface for simulated network- Returns:
- current NetworkManager
-
destroyHub
public void destroyHub()
Method cleans up all resources and destroys its instance
-
-