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

java.lang.Object
  extended by org.ow2.jasmine.monitoring.mbeancmd.AbstractCommand
      extended by org.ow2.jasmine.monitoring.mbeancmd.commands.Lewys
All Implemented Interfaces:
org.ow2.jasmine.monitoring.mbeancmd.Command
Direct Known Subclasses:
Disk, DiskFree, Network

public abstract class Lewys
extends org.ow2.jasmine.monitoring.mbeancmd.AbstractCommand

Manipulate LeWYS probes

Author:
Loris Bouzonnet

Field Summary
protected  java.util.List arg_probe_config
          List of Attributes (-a option)
protected  org.apache.commons.cli.CommandLine commandLine
          Command line arguments.
protected  java.lang.Object domainName
          Domain name to be printed in results
protected  java.lang.String graphDef
          Graph definitions, null for no graph output.
protected  java.lang.String header
          Header to use.
protected  java.lang.String jasmineURI
          URI of the JASMINe event switch, null for no JASMINe output.
protected static int LINUX_2_4
           
protected static int LINUX_2_6
           
protected static int MAC_OS_X
           
protected  org.apache.commons.cli.Options options
          List of options that should be parsed from the command line.
protected  int osType
          Supported OS
protected  java.lang.String outputFilePath
          Output file path, null for no file output.
protected  long period
          Poll period in seconds.
protected  java.io.PrintStream pout
          Output stream.
protected  org.objectweb.lewys.probe.Probe probe
          Lewys Probe
protected  java.lang.String separator
          Separator to use.
protected  java.lang.Object serverName
          Server name to be printed in results
protected static int WINDOWS
           
 
Fields inherited from class org.ow2.jasmine.monitoring.mbeancmd.AbstractCommand
arguments, logger, name, SIMPLEDATEFORMAT
 
Constructor Summary
Lewys()
          Constructor
 
Method Summary
protected abstract  void configProbe()
           
 int exec(org.ow2.jasmine.monitoring.mbeancmd.CommandDispatcher cmdDispatcher)
          Executes the command.
protected abstract  void lewysPoll()
           
protected  void parseCommandLine(java.lang.String[] args)
          Parses the command line arguments into Stat.commandLine.
protected  void setOptions()
          Sets all options that are parseable from the command line.
 java.lang.String summary()
           
 
Methods inherited from class org.ow2.jasmine.monitoring.mbeancmd.AbstractCommand
getHelpDoc, getName, help, setArgs, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

osType

protected int osType
Supported OS


LINUX_2_4

protected static final int LINUX_2_4
See Also:
Constant Field Values

LINUX_2_6

protected static final int LINUX_2_6
See Also:
Constant Field Values

WINDOWS

protected static final int WINDOWS
See Also:
Constant Field Values

MAC_OS_X

protected static final int MAC_OS_X
See Also:
Constant Field Values

options

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


commandLine

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


arg_probe_config

protected java.util.List arg_probe_config
List of Attributes (-a option)


period

protected long period
Poll period in seconds.


graphDef

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


outputFilePath

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


jasmineURI

protected java.lang.String jasmineURI
URI of the JASMINe event switch, null for no JASMINe output.


separator

protected java.lang.String separator
Separator to use.


serverName

protected java.lang.Object serverName
Server name to be printed in results


domainName

protected java.lang.Object domainName
Domain name to be printed in results


probe

protected org.objectweb.lewys.probe.Probe probe
Lewys Probe


pout

protected java.io.PrintStream pout
Output stream.


header

protected java.lang.String header
Header to use.

Constructor Detail

Lewys

public Lewys()
Constructor

Method Detail

exec

public int exec(org.ow2.jasmine.monitoring.mbeancmd.CommandDispatcher cmdDispatcher)
Executes the command.

Specified by:
exec in interface org.ow2.jasmine.monitoring.mbeancmd.Command
Specified by:
exec in class org.ow2.jasmine.monitoring.mbeancmd.AbstractCommand
Returns:
0 if succeeded, an error code otherwise.

summary

public java.lang.String summary()
Specified by:
summary in interface org.ow2.jasmine.monitoring.mbeancmd.Command
Specified by:
summary in class org.ow2.jasmine.monitoring.mbeancmd.AbstractCommand

configProbe

protected abstract void configProbe()

lewysPoll

protected abstract void lewysPoll()

parseCommandLine

protected void parseCommandLine(java.lang.String[] args)
                         throws org.apache.commons.cli.ParseException,
                                javax.management.MalformedObjectNameException
Parses the command line arguments into Stat.commandLine.

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

setOptions

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

See Also:
Poll.options


Copyright © 2011 OW2 Consortium. All Rights Reserved.