public class BasicRouterInfo
extends java.lang.Object
Constructor and Description |
---|
BasicRouterInfo(int id,
long time)
BasicRouterInfo with router id and time only.
|
BasicRouterInfo(int id,
long time,
LocalControllerInfo lc,
int port1)
BasicRouterInfo with router id, start time, the LocalController, and
the managementPort
|
BasicRouterInfo(int id,
long time,
LocalControllerInfo lc,
int port1,
int port2)
BasicRouterInfo with router id, start time, the LocalController,
the managementPort, and the router-to-router port.
|
Modifier and Type | Method and Description |
---|---|
void |
addApplication(java.lang.Integer id,
java.lang.String name)
Add an application to the router.
|
boolean |
equals(java.lang.Object obj)
Check if this is equal to another BasicRouterInfo
|
java.lang.String |
getAddress()
Get the address of the router.
|
java.util.Map<java.lang.String,java.lang.Object> |
getApplicationData(java.lang.String appName)
Get the data held for an application
So /R1/App/usr.applications.Send/1 -> ["time" : 00:14:52, "id" : 1, "startime" : 1331119233159, "state": "RUNNING",
"classname" : "usr.applications.Send", "args" : "[4, 3000, 250000, -d, 250, -i, 10]" ]
|
java.util.Set<java.lang.Integer> |
getApplicationIDs()
List all application IDs to the router.
|
java.util.Set<java.lang.String> |
getApplications()
List all application to the router.
|
java.lang.String |
getAppName(java.lang.Integer id)
Get App Name given an ID
|
java.lang.String |
getHost()
Get the hostname of the LocalController managing the router
|
int |
getId()
Get the router id
|
LocalControllerInfo |
getLocalControllerInfo()
Get the LocalController managing the router
|
int |
getManagementPort()
Get the router management port
|
java.lang.String |
getName()
Get the name of the router.
|
int |
getRoutingPort()
Get the router router-to-router port
|
long |
getTime()
Get the router time
|
void |
removeApplication(java.lang.Integer id,
java.lang.String name)
Remove an application to the router.
|
void |
setAddress(java.lang.String address)
Set the address of the router.
|
void |
setApplicationData(java.lang.String appName,
java.util.Map<java.lang.String,java.lang.Object> data)
Set the data held for an application
So /R1/App/usr.applications.Send/1 -> ["time" : 00:14:52, "id" : 1, "startime" : 1331119233159, "state": "RUNNING",
"classname" : "usr.applications.Send", "args" : "[4, 3000, 250000, -d, 250, -i, 10]" ]
|
void |
setName(java.lang.String name)
Set the name of the router.
|
java.lang.String |
toString()
To string
|
public BasicRouterInfo(int id, long time)
public BasicRouterInfo(int id, long time, LocalControllerInfo lc, int port1)
public BasicRouterInfo(int id, long time, LocalControllerInfo lc, int port1, int port2)
public long getTime()
public int getId()
public int getManagementPort()
public int getRoutingPort()
public LocalControllerInfo getLocalControllerInfo()
public java.lang.String getHost()
public java.lang.String getAddress()
public void setAddress(java.lang.String address)
public java.lang.String getName()
public void setName(java.lang.String name)
public void addApplication(java.lang.Integer id, java.lang.String name)
public void removeApplication(java.lang.Integer id, java.lang.String name)
public java.util.Set<java.lang.String> getApplications()
public java.util.Set<java.lang.Integer> getApplicationIDs()
public java.lang.String getAppName(java.lang.Integer id)
public java.util.Map<java.lang.String,java.lang.Object> getApplicationData(java.lang.String appName)
public void setApplicationData(java.lang.String appName, java.util.Map<java.lang.String,java.lang.Object> data)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
User Space Routing 0.10.3