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

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

public class Replay
extends AbstractCommand

Replays an mbeancmd session based on the standard input or a file.


Field Summary
private  java.lang.String[] columns
          Columns to output.
private  org.apache.commons.cli.CommandLine commandLine
          Command line arguments.
private  java.lang.String graphDef
          Graph definitions, null for no graph output.
private  java.lang.String inputFile
          Input file name, null for no file input.
private  boolean isColumnOption
          Only output certain columns ?
private  boolean isRowMatchOption
          Filter rows ?
private  boolean isSeparator
          Is separator set ?
private  boolean isTimeMatchOption
          Filter time ?
private  org.apache.commons.cli.Options options
          List of options that should be parsed from the command line.
private  java.lang.String outputFilePath
          Output file path, null for no file output.
private  java.lang.String rowMatchPattern
          Row filter pattern.
private  java.lang.String separator
          Separator to use.
private  java.lang.String[] timeMatchArgs
          Time filter arguments.
 
Fields inherited from class org.ow2.jasmine.monitoring.mbeancmd.AbstractCommand
arguments, name, simpleDateFormat
 
Constructor Summary
Replay()
          Constructor: calls setOptions().
 
Method Summary
 void exec()
          Implementation of inherited abstract method.
static void main(java.lang.String[] args)
          Tests the Replay implementation.
 void parseCommandLine(java.lang.String[] args)
          Parses the command line arguments into commandLine.
private  void setOptions()
          Sets all options that are parseable from the command line.
 java.lang.String summary()
          Implementation of inherited abstract method.
 
Methods inherited from class org.ow2.jasmine.monitoring.mbeancmd.AbstractCommand
Exit, getHelpDoc, getName, help, setArgs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

options

private org.apache.commons.cli.Options options
List of options that should be parsed from the command line.


commandLine

private org.apache.commons.cli.CommandLine commandLine
Command line arguments.


inputFile

private java.lang.String inputFile
Input file name, null for no file input.


graphDef

private java.lang.String graphDef
Graph definitions, null for no graph output.


outputFilePath

private java.lang.String outputFilePath
Output file path, null for no file output.


isRowMatchOption

private boolean isRowMatchOption
Filter rows ?


rowMatchPattern

private java.lang.String rowMatchPattern
Row filter pattern.


isTimeMatchOption

private boolean isTimeMatchOption
Filter time ?


timeMatchArgs

private java.lang.String[] timeMatchArgs
Time filter arguments.


isSeparator

private boolean isSeparator
Is separator set ?


separator

private java.lang.String separator
Separator to use.


isColumnOption

private boolean isColumnOption
Only output certain columns ?


columns

private java.lang.String[] columns
Columns to output.

Constructor Detail

Replay

public Replay()
Constructor: calls setOptions().

Method Detail

exec

public void exec()
Implementation of inherited abstract method.

Specified by:
exec in interface Command
Specified by:
exec in class AbstractCommand
See Also:
AbstractCommand.exec()

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 Replay 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.

setOptions

private void setOptions()
Sets all options that are parseable from the command line.

See Also:
options