|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectvideoClientCaller.PlabClientCallerMain
public class PlabClientCallerMain
This is the main class used for communication with PlanetLab nodes which are already setup to communicate over CORBA.
This means that the PlabClient
runs on them.
Field Summary | |
---|---|
private int |
CALCBANDWIDTH_MAX_TRIES
how often should the client be asked for a calcbandwidth result |
private int |
CALCBANDWIDTH_MAX_WAIT_TIME_IN_SEC
Calculate the maximum number of seconds to wait until a measurement finishes. If we exceed this amount, then we won't reach the MIN_ALLOWED_BANDWIDTH_FOR_TIMEOUT and so the measurement can be stopped. |
private long |
CALCBANDWIDTH_SLEEP_TIME_IN_MS
wait 30 sec until next try to get the result of the bandwidth calculation |
private static int |
INVALID_CLOSEST_LEADER
used to know, when a leader was not found |
private int |
MIN_ALLOWED_BANDWIDTH_FOR_TIMEOUT
Defines the minimum allowed bandwidth as a result of a mesurement to a node in kbit/s. After exceeding the calculated CALCBANDWIDTH_MAX_WAIT_TIME_IN_SEC time without a result, we'll know that the minimum bandwidth can not be reached, and the measurement will be stopped. This should help the experiment not to last too long. |
private VideoClient |
myServer
|
private java.lang.String |
myServerHostName
|
static java.lang.String |
SERVER_NAME
The name of the class which is running on the nodes |
private static boolean |
testLoseFirstMeasurement
if set to true, the first bandwidth-measurement will be "lost" (useful only for test purposes!!!) |
private static int |
UNUSED_MEASUREMENT_ID
used to identify a new measurement command |
Constructor Summary | |
---|---|
PlabClientCallerMain()
Construct the object with default parameters. |
Method Summary | |
---|---|
structAnalyzeResult |
analyzeVideo(java.lang.String hostname,
java.lang.String videoFileName)
Analyze the received video file. call is done via CORBA |
structBandwidthInfo[] |
calculateBandwidths(X2XProxy sourceProxy,
java.util.Vector<X2XProxy> nodes)
Calculate the bandwidth from sourceProxy to nodes. call is done via CORBA |
structNetClOutput |
calculateNetClosenessToLeaders(java.lang.String hostname,
structNetClInput leaders)
Calculates the bandwidth from hostname to leaders. The values of the closest leader are returned. Call is done via CORBA |
void |
cleanUp()
cleans up the Remote-object ref |
static int |
getINVALID_CLOSEST_LEADER()
|
int |
getPlabClientVersion(java.lang.String hostname)
Get release-version of the source code running on node. Note that this method is oftenly used to check whether a node is prepared for receiving further commands (bootstrapped). Call is done via CORBA. |
static boolean |
isClosestLeaderIdxValid(int closestLeaderIdx)
Tells whether the Index of the closest leader, which is returned by calculateNetClosenessToLeaders(), is valid. |
private org.omg.CosNaming.NamingContextExt |
retrieveNamingContext(java.lang.String hostName)
Connects to the orbd of the host and gets its naming-context. |
private VideoClient |
retrieveVideoClientRef(java.lang.String hostName)
Retrieves naming-context and reference to a VideoClient object from host. |
void |
setPlabClientSSHOptions(java.lang.String hostname)
Sets the SSH daemon options of the client and restarts the daemon. call is done via CORBA |
void |
startSession(java.lang.String hostname,
structSessionParams params)
Start RTSP/RTP session from remote node to a remote server. Call is done via CORBA |
boolean |
stopMeasurement(java.lang.String hostname)
Sends a message to the client to stop the running measurement. call is done via CORBA |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SERVER_NAME
private static final int UNUSED_MEASUREMENT_ID
private static final int INVALID_CLOSEST_LEADER
private final int MIN_ALLOWED_BANDWIDTH_FOR_TIMEOUT
private final long CALCBANDWIDTH_SLEEP_TIME_IN_MS
private final int CALCBANDWIDTH_MAX_WAIT_TIME_IN_SEC
private final int CALCBANDWIDTH_MAX_TRIES
private VideoClient myServer
private java.lang.String myServerHostName
private static boolean testLoseFirstMeasurement
Constructor Detail |
---|
public PlabClientCallerMain()
Method Detail |
---|
public void cleanUp()
public int getPlabClientVersion(java.lang.String hostname) throws java.lang.Exception
java.lang.Exception
public boolean stopMeasurement(java.lang.String hostname) throws java.lang.Exception
hostname
- - The hostname of the client
java.lang.Exception
public void setPlabClientSSHOptions(java.lang.String hostname) throws java.lang.Exception
java.lang.Exception
public void startSession(java.lang.String hostname, structSessionParams params) throws java.lang.Exception
java.lang.Exception
- - if something went wrongpublic structAnalyzeResult analyzeVideo(java.lang.String hostname, java.lang.String videoFileName) throws java.lang.Exception
java.lang.Exception
public structBandwidthInfo[] calculateBandwidths(X2XProxy sourceProxy, java.util.Vector<X2XProxy> nodes) throws java.lang.Exception
java.lang.Exception
public structNetClOutput calculateNetClosenessToLeaders(java.lang.String hostname, structNetClInput leaders) throws java.lang.Exception
java.lang.Exception
public static boolean isClosestLeaderIdxValid(int closestLeaderIdx)
closestLeaderIdx
-
private VideoClient retrieveVideoClientRef(java.lang.String hostName) throws org.omg.CORBA.ORBPackage.InvalidName, org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName
hostName
- - The name of the host which videoClient is needed.
org.omg.CORBA.ORBPackage.InvalidName
org.omg.CosNaming.NamingContextPackage.NotFound
org.omg.CosNaming.NamingContextPackage.CannotProceed
org.omg.CosNaming.NamingContextPackage.InvalidName
private org.omg.CosNaming.NamingContextExt retrieveNamingContext(java.lang.String hostName) throws org.omg.CORBA.ORBPackage.InvalidName
hostName
-
org.omg.CORBA.ORBPackage.InvalidName
public static int getINVALID_CLOSEST_LEADER()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |