org.ow2.jasmine.monitoring.mbeancmd.commands
Class Stat

java.lang.Object
  extended by org.ow2.jasmine.monitoring.mbeancmd.AbstractCommand
      extended by org.ow2.jasmine.monitoring.mbeancmd.commands.Stat
All Implemented Interfaces:
Command

public class Stat
extends AbstractCommand

Periodically polls attributes of one or more mbeans on one or more J2EE servers. Extended to support several mbean names identified with aliases, and attributes prefixed with alias names (FTO).


Field Summary
protected  boolean goOn
           
 
Fields inherited from class org.ow2.jasmine.monitoring.mbeancmd.AbstractCommand
arguments, logger, name, SIMPLEDATEFORMAT
 
Constructor Summary
Stat()
           
 
Method Summary
 int exec(CommandDispatcher cmdDispatcher)
          Implementation of inherited abstract method.
 void help()
          Calls AbstractCommand.help() and prints the DTD for the graph.
static void main(String[] args)
          Tests the Stat implementation.
 void parseCommandLine(String[] args)
          Parses the command line arguments into commandLine.
 void stop()
          Stop a running command
 String summary()
          Implementation of inherited abstract method.
 
Methods inherited from class org.ow2.jasmine.monitoring.mbeancmd.AbstractCommand
getHelpDoc, getName, setArgs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

goOn

protected boolean goOn
Constructor Detail

Stat

public Stat()
Method Detail

main

public static void main(String[] args)
Tests the Stat implementation.

Parameters:
args - Arguments to pass to Stat#setArgs.

stop

public void stop()
Description copied from interface: Command
Stop a running command

Specified by:
stop in interface Command
Overrides:
stop in class AbstractCommand

exec

public int exec(CommandDispatcher cmdDispatcher)
Implementation of inherited abstract method. Will never return except in the case of failure.

Specified by:
exec in interface Command
Specified by:
exec in class AbstractCommand
Returns:
0 if succeeded, an error code otherwise.
See Also:
AbstractCommand#exec()

help

public void help()
Calls AbstractCommand.help() and prints the DTD for the graph.

Specified by:
help in interface Command
Overrides:
help in class AbstractCommand
See Also:
Command.help(), AbstractCommand.getHelpDoc()

summary

public String summary()
Implementation of inherited abstract method.

Specified by:
summary in interface Command
Specified by:
summary in class AbstractCommand
Returns:
Command's summary.
See Also:
AbstractCommand.summary()

parseCommandLine

public void parseCommandLine(String[] args)
                      throws org.apache.commons.cli.ParseException,
                             MalformedObjectNameException
Parses the command line arguments into commandLine.

Parameters:
args - Arguments to parse.
Throws:
org.apache.commons.cli.ParseException - If parsing fails.
MalformedObjectNameException - Object name given in the command line is invalid.


Copyright © 2011 OW2 Consortium. All Rights Reserved.