Exemplo n.º 1
0
 /** Shutdown the agent again. */
 public void shutdown() {
   try {
     if (options.getDumpOnExit()) {
       output.writeExecutionData(false);
     }
     output.shutdown();
     if (options.getJmx()) {
       ManagementFactory.getPlatformMBeanServer().unregisterMBean(new ObjectName(JMX_NAME));
     }
   } catch (final Exception e) {
     logger.logExeption(e);
   }
 }
Exemplo n.º 2
0
 /** Initializes this agent. */
 public void startup() {
   try {
     String sessionId = options.getSessionId();
     if (sessionId == null) {
       sessionId = createSessionId();
     }
     data.setSessionId(sessionId);
     output = createAgentOutput();
     output.startup(options, data);
     if (options.getJmx()) {
       ManagementFactory.getPlatformMBeanServer()
           .registerMBean(new StandardMBean(this, IAgent.class), new ObjectName(JMX_NAME));
     }
   } catch (final Exception e) {
     logger.logExeption(e);
   }
 }
Exemplo n.º 3
0
 public void dump(final boolean reset) throws IOException {
   output.writeExecutionData(reset);
 }