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

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

public class Poll
extends AbstractCommand

Polls multiple J2EE servers at the given period.


Field Summary
protected  org.ow2.util.log.Log logger
          Logger.
protected  XServerSampler xss
           
 
Fields inherited from class org.ow2.jasmine.monitoring.mbeancmd.AbstractCommand
arguments, name, SIMPLEDATEFORMAT
 
Constructor Summary
Poll()
          Constructor: calls setOptions().
 
Method Summary
 int exec(CommandDispatcher cmdDispatcher)
          Implementation of inherited abstract method.
 void help()
          Calls AbstractCommand.help() followed by printDtd().
static void main(java.lang.String[] args)
          Tests the Poll implementation.
 void parseCommandLine(java.lang.String[] args)
          Parses the command line arguments into commandLine.
 void stop()
          Stop a running command
 java.lang.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

logger

protected org.ow2.util.log.Log logger
Logger.


xss

protected XServerSampler xss
Constructor Detail

Poll

public Poll()
Constructor: calls setOptions().

Method Detail

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() followed by printDtd().

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

summary

public java.lang.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()

main

public static void main(java.lang.String[] args)
Tests the Poll implementation.

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

parseCommandLine

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

Parameters:
args - Arguments to parse.
Throws:
org.apache.commons.cli.ParseException - If parsing fails.


Copyright © 2011 OW2 Consortium. All Rights Reserved.