< prev index next >

src/com/sun/javatest/agent/AgentApplet.java

Print this page
rev 152 : 7902253: Remove unnecessary array creation for varargs parameters
7902245: Correct Agent.productVersion
Reviewed-by: jjg


 234 
 235     public void start() {
 236         if (shareAppletContext)
 237             MainAppletContext.setStarted(true);
 238         super.start();
 239     }
 240 
 241     public void destroy() {
 242         Component c = getComponent(0);
 243         if (c instanceof AgentPanel) {
 244             AgentPanel ap = (AgentPanel) c;
 245             ap.stop();
 246         }
 247     }
 248 
 249     /**
 250      * Returns a string containing information about
 251      * the author, version and copyright of the applet.
 252      */
 253     public String getAppletInfo() {
 254         return (Agent.productName + " " +
 255                 Agent.productVersion + " " +
 256                 Agent.productCopyright);
 257     }
 258 
 259     /**
 260      * Returns an array of strings describing the
 261      * parameters that are understood by this
 262      * applet.
 263      */
 264     public String[][] getParameterInfo() {
 265         String[][] pinfo = {
 266             {"mode",       "\"active\" or \"passive\"",
 267                                         "the mode for the agent"},
 268             {"activeHost",  "hostname", "the host for active connections"},
 269             {"activePort",  "port",     "the port for active connections"},
 270             {"passivePort", "port",     "the port for passive connections"},
 271             {"map",         "url",      "map file for translating arguments of incoming requests"},
 272             {"concurrency", "number",   "the maximum number of simultaneous connections"},
 273             {"history",     "int",      "the size of the execution history"},
 274             {"trace",       "boolean",  "trace the execution of the agent"}
 275         };
 276         return pinfo;




 234 
 235     public void start() {
 236         if (shareAppletContext)
 237             MainAppletContext.setStarted(true);
 238         super.start();
 239     }
 240 
 241     public void destroy() {
 242         Component c = getComponent(0);
 243         if (c instanceof AgentPanel) {
 244             AgentPanel ap = (AgentPanel) c;
 245             ap.stop();
 246         }
 247     }
 248 
 249     /**
 250      * Returns a string containing information about
 251      * the author, version and copyright of the applet.
 252      */
 253     public String getAppletInfo() {
 254         return (Agent.PRODUCT_NAME + " " +
 255                 Agent.PRODUCT_VERSION + " " +
 256                 Agent.PRODUCT_COPYRIGHT);
 257     }
 258 
 259     /**
 260      * Returns an array of strings describing the
 261      * parameters that are understood by this
 262      * applet.
 263      */
 264     public String[][] getParameterInfo() {
 265         String[][] pinfo = {
 266             {"mode",       "\"active\" or \"passive\"",
 267                                         "the mode for the agent"},
 268             {"activeHost",  "hostname", "the host for active connections"},
 269             {"activePort",  "port",     "the port for active connections"},
 270             {"passivePort", "port",     "the port for passive connections"},
 271             {"map",         "url",      "map file for translating arguments of incoming requests"},
 272             {"concurrency", "number",   "the maximum number of simultaneous connections"},
 273             {"history",     "int",      "the size of the execution history"},
 274             {"trace",       "boolean",  "trace the execution of the agent"}
 275         };
 276         return pinfo;


< prev index next >