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:
Command
Direct Known Subclasses:
Disk, DiskFree, Network

public abstract class Lewys
extends AbstractCommand

Manipulate LeWYS probes

Author:
Loris Bouzonnet

Field Summary
protected  List arg_probe_config
          List of Attributes (-a option)
protected  org.apache.commons.cli.CommandLine commandLine
          Command line arguments.
protected  Object domainName
          Domain name to be printed in results
protected  String graphDef
          Graph definitions, null for no graph output.
protected  String header
          Header to use.
protected  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  String outputFilePath
          Output file path, null for no file output.
protected  long period
          Poll period in seconds.
protected  PrintStream pout
          Output stream.
protected  org.objectweb.lewys.probe.Probe probe
          Lewys Probe
protected  String separator
          Separator to use.
protected  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(CommandDispatcher cmdDispatcher)
          Executes the command.
protected abstract  void lewysPoll()
           
protected  void parseCommandLine(String[] args)
          Parses the command line arguments into Stat.commandLine.
protected  void setOptions()
          Sets all options that are parseable from the command line.
 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 List arg_probe_config
List of Attributes (-a option)


period

protected long period
Poll period in seconds.


graphDef

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


outputFilePath

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


jasmineURI

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


separator

protected String separator
Separator to use.


serverName

protected Object serverName
Server name to be printed in results


domainName

protected Object domainName
Domain name to be printed in results


probe

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


pout

protected PrintStream pout
Output stream.


header

protected String header
Header to use.

Constructor Detail

Lewys

public Lewys()
Constructor

Method Detail

exec

public int exec(CommandDispatcher cmdDispatcher)
Executes the command.

Specified by:
exec in interface Command
Specified by:
exec in class AbstractCommand
Returns:
0 if succeeded, an error code otherwise.

summary

public String summary()
Specified by:
summary in interface Command
Specified by:
summary in class AbstractCommand

configProbe

protected abstract void configProbe()

lewysPoll

protected abstract void lewysPoll()

parseCommandLine

protected void parseCommandLine(String[] args)
                         throws org.apache.commons.cli.ParseException,
                                MalformedObjectNameException
Parses the command line arguments into Stat.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.

setOptions

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

See Also:
Poll.options


Copyright © 2012 OW2 Consortium. All Rights Reserved.