|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--edu.virginia.cs.mng.hypercast.testing_and_monitoring.RC2
This class provides an interface that allows users to view and manipulate statistics and variables which are made available by a class that implements the I_Stats interface through an instance of the StatsAccessor class. Ideally, the processes that make these values available will also use StatsAccessorAdvertisers with their StatsAccessors. This will allow an instance of the PortalListManager class to automatically discover the ports that are used by the StatsAccessor instances.
I_Stats,
StatsAccessor,
StatsAccessorAdvertiser,
ReliableXmlSocket,
PortalListManager| Field Summary | |
java.util.Hashtable |
commands
A Hashtable mapping the commands, e.g. |
static int |
DEFAULT_PORT_WITH_NO_SERVER
Default port used for the ActiveStatsAccessor. |
Experiment |
experiment
Values for the current experiment. |
java.lang.Object |
experimentLock
A guard to control access to the object experiment. |
PortalListManager |
portalManager
The PortalListManager object that is used to discover and keep track of the StatsAccessors. |
ReliableXmlSocket |
reliableSocket
The ReliableXmlSocket object that is used to send messages to the StatsAccessors. |
| Constructor Summary | |
protected |
RC2()
Inserts generic RC2Command objects into commands. |
| Method Summary | |
(package private) static void |
|
protected void |
addCommand(java.lang.String s,
RC2Command c)
Used to insert an RC2Command object into commands. |
protected void |
commandLine(java.io.BufferedReader in,
java.io.PrintStream out,
java.io.PrintStream err)
Receives commands on the InputStream and processes them. |
protected Experiment |
createExperiment()
Creates a new Experiment. |
void |
go(java.lang.String[] args)
A psuedo-main() method. |
static void |
main(java.lang.String[] args)
Creates a new object of type RS2 and calls go(args). |
protected void |
processCommand(java.lang.String line,
java.io.BufferedReader in,
java.io.PrintStream out,
java.io.PrintStream err)
Performs actions for a single command. |
protected void |
processCommands(java.lang.String[] lines,
java.io.BufferedReader in,
java.io.PrintStream out,
java.io.PrintStream err)
Calls the processCommand method for each command. |
protected java.lang.String |
removeBackspaces(java.lang.String s)
Compensates for terminals that do not allow backspaces with the readln command. |
void |
usage()
Prints the arguments that may be used by go(). |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
| Field Detail |
public static final int DEFAULT_PORT_WITH_NO_SERVER
public ReliableXmlSocket reliableSocket
public PortalListManager portalManager
public Experiment experiment
public java.lang.Object experimentLock
experiment. This prevents
race conditions when multiple terminals are open.public java.util.Hashtable commands
| Constructor Detail |
protected RC2()
commands.| Method Detail |
protected void addCommand(java.lang.String s,
RC2Command c)
commands.
This may be modified in the future in order to achieve greater command functionality.
For example, it could keep track of what order the commands were added in.protected Experiment createExperiment()
public static void main(java.lang.String[] args)
go(args).public void usage()
public void go(java.lang.String[] args)
main() is expected to
call go(). This method creates the reliableSocket and portalManager and then
calls commandLine() with System.in,
System.out, and System.err.
protected void commandLine(java.io.BufferedReader in,
java.io.PrintStream out,
java.io.PrintStream err)
protected java.lang.String removeBackspaces(java.lang.String s)
readln command. This method removes all backspaces from a
string (and all of the characters preceding them).
protected void processCommands(java.lang.String[] lines,
java.io.BufferedReader in,
java.io.PrintStream out,
java.io.PrintStream err)
throws java.lang.Exception
processCommand method for each command.
If a command throws an Exception("break"), then the processing halts.
protected void processCommand(java.lang.String line,
java.io.BufferedReader in,
java.io.PrintStream out,
java.io.PrintStream err)
throws java.lang.Exception
static void()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||