public class LocalControllerInteractor
extends java.lang.Object
Constructor and Description |
---|
LocalControllerInteractor(java.net.InetAddress addr,
int port)
Constructor for a MCRP connection
to the ManagementConsole of a LocalController.
|
LocalControllerInteractor(LocalHostInfo lh)
Constructor for a MCRP connection
to the ManagementConsole of a LocalController.
|
LocalControllerInteractor(java.lang.String addr,
int port)
Constructor for a MCRP connection
to the ManagementConsole of a LocalController.
|
Modifier and Type | Method and Description |
---|---|
us.monoid.json.JSONObject |
appStart(int routerId,
java.lang.String className,
java.lang.String[] args)
Ask the LocalController to start a command on a router.
|
us.monoid.json.JSONObject |
appStop(int routerId,
java.lang.String appName)
Ask the LocalController to stop a command on a router.
|
java.lang.Boolean |
checkLocalController(LocalHostInfo gc)
Check with a local controller.
|
java.lang.Boolean |
checkLocalController(java.lang.String host,
int port)
Check with a local controller.
|
us.monoid.json.JSONObject |
connectRouters(java.lang.String host1,
int port1,
java.lang.String host2,
int port2,
int weight,
java.lang.String name)
Ask the Local Controller to connect routers
Name is optional.
|
java.lang.Boolean |
endLink(java.lang.String host1,
int port1,
java.lang.String address)
Ask the Local Controller to end a link
|
us.monoid.json.JSONObject |
endRouter(java.lang.String host1,
int port1)
Ask the Local Controller to stop a router
|
int |
getPort()
Get the port this LocalControllerInteractor is connecting to
|
java.util.List<java.lang.String> |
getRouterStats()
Get the stats from a Router.
|
java.lang.Boolean |
monitoringStart(java.net.InetSocketAddress addr,
int howOften)
Monitoring Start.
|
java.lang.Boolean |
monitoringStop()
Monitoring Stop
|
us.monoid.json.JSONObject |
newRouter(int routerId,
int port)
As the LocalController to start a new router.
|
us.monoid.json.JSONObject |
newRouter(int routerId,
int port1,
int port2,
java.lang.String address,
java.lang.String name)
Ask the LocalController to start a new router.
|
java.lang.Boolean |
reportAP(int GID,
int AP)
Send a message to a local controller informing it about a routers
status as an aggregation point
|
void |
requestRouterStats()
Request stats from routers -- stats are returned by a separate command
|
java.lang.Boolean |
setAP(int GID,
int APGID)
Send a message to a local controller intended for a router to
set its aggregation point
|
java.lang.Boolean |
setConfigString(java.lang.String config)
Set the configuration string for a router
|
java.lang.Boolean |
setLinkWeight(java.lang.String host1,
int port1,
java.lang.String address,
int weight)
Ask the Local Controller to set a link weight
|
java.lang.Boolean |
shutDown()
Shutdown the LocalController we are interacting with.
|
public LocalControllerInteractor(java.lang.String addr, int port) throws java.net.UnknownHostException, java.io.IOException
addr
- the name of the hostport
- the port the server is listening onjava.net.UnknownHostException
java.io.IOException
public LocalControllerInteractor(java.net.InetAddress addr, int port) throws java.net.UnknownHostException, java.io.IOException
addr
- the InetAddress of the hostport
- the port the server is listening onjava.net.UnknownHostException
java.io.IOException
public LocalControllerInteractor(LocalHostInfo lh) throws java.net.UnknownHostException, java.io.IOException
lh
- the LocalHostInfo descriptionjava.net.UnknownHostException
java.io.IOException
public int getPort()
public java.lang.Boolean shutDown() throws java.io.IOException, us.monoid.json.JSONException
java.io.IOException
us.monoid.json.JSONException
public us.monoid.json.JSONObject newRouter(int routerId, int port) throws java.io.IOException, us.monoid.json.JSONException
java.io.IOException
us.monoid.json.JSONException
public us.monoid.json.JSONObject newRouter(int routerId, int port1, int port2, java.lang.String address, java.lang.String name) throws java.io.IOException, us.monoid.json.JSONException
java.io.IOException
us.monoid.json.JSONException
public us.monoid.json.JSONObject connectRouters(java.lang.String host1, int port1, java.lang.String host2, int port2, int weight, java.lang.String name) throws java.io.IOException, us.monoid.json.JSONException
java.io.IOException
us.monoid.json.JSONException
public us.monoid.json.JSONObject endRouter(java.lang.String host1, int port1) throws java.io.IOException, us.monoid.json.JSONException
java.io.IOException
us.monoid.json.JSONException
public java.lang.Boolean endLink(java.lang.String host1, int port1, java.lang.String address) throws java.io.IOException, us.monoid.json.JSONException
java.io.IOException
us.monoid.json.JSONException
public java.lang.Boolean setLinkWeight(java.lang.String host1, int port1, java.lang.String address, int weight) throws java.io.IOException, us.monoid.json.JSONException
java.io.IOException
us.monoid.json.JSONException
public java.lang.Boolean setConfigString(java.lang.String config) throws java.io.IOException, us.monoid.json.JSONException
java.io.IOException
us.monoid.json.JSONException
public us.monoid.json.JSONObject appStart(int routerId, java.lang.String className, java.lang.String[] args) throws java.io.IOException, us.monoid.json.JSONException
java.io.IOException
us.monoid.json.JSONException
public us.monoid.json.JSONObject appStop(int routerId, java.lang.String appName) throws java.io.IOException, us.monoid.json.JSONException
java.io.IOException
us.monoid.json.JSONException
public java.lang.Boolean checkLocalController(java.lang.String host, int port) throws java.io.IOException, us.monoid.json.JSONException
java.io.IOException
us.monoid.json.JSONException
public java.lang.Boolean checkLocalController(LocalHostInfo gc) throws java.io.IOException, us.monoid.json.JSONException
java.io.IOException
us.monoid.json.JSONException
public java.lang.Boolean setAP(int GID, int APGID) throws java.io.IOException, us.monoid.json.JSONException
java.io.IOException
us.monoid.json.JSONException
public java.lang.Boolean reportAP(int GID, int AP) throws java.io.IOException, us.monoid.json.JSONException
java.io.IOException
us.monoid.json.JSONException
public void requestRouterStats() throws java.io.IOException, us.monoid.json.JSONException
java.io.IOException
us.monoid.json.JSONException
public java.util.List<java.lang.String> getRouterStats() throws java.io.IOException, us.monoid.json.JSONException
java.io.IOException
us.monoid.json.JSONException
public java.lang.Boolean monitoringStart(java.net.InetSocketAddress addr, int howOften) throws java.io.IOException, us.monoid.json.JSONException
addr
- The InetSocketAddress of the Monitoring data consumerhowOften
- How many seconds between measurementsjava.io.IOException
us.monoid.json.JSONException
public java.lang.Boolean monitoringStop() throws java.io.IOException, us.monoid.json.JSONException
java.io.IOException
us.monoid.json.JSONException
User Space Routing 0.10.3