SigarCommandBase (Sigar API)
Date: 2009-07-09

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hyperic.sigar.cmd
Class SigarCommandBase

    java.lang.Object
      org.hyperic.sigar.shell.ShellCommandBase
          org.hyperic.sigar.cmd.SigarCommandBase

All Implemented Interfaces:
  ShellCommandHandler, GetlineCompleter

Direct Known Subclasses:
  CpuInfo, Df, Du, FileVersionInfo, Free, Ifconfig, Iostat, Kill, Ls, MultiPs, NetInfo, Netstat, Nfsstat, Pidof, ProcFileInfo, ProcInfo, ProcModuleInfo, Ps, Route, ShowArgs, ShowEnv, SysInfo, Time, Ulimit, Uptime, Version, Who, Win32Service

    public abstract class SigarCommandBase

extends ShellCommandBase
implements GetlineCompleter

Field Summary
`protected java.io.PrintStream` | `err`
`protected java.io.PrintStream` | `out`
`protected java.util.List` | `output`
`protected SigarProxy` | `proxy`
`protected Shell` | `shell`
`protected Sigar` | `sigar`

Fields inherited from class org.hyperic.sigar.shell.ShellCommandBase
`itsCommandName, itsShell`

Constructor Summary
`SigarCommandBase()`
`SigarCommandBase(Shell shell)`

Method Summary
`java.lang.String` | `complete(java.lang.String line)`
`java.lang.String` | `completePid(java.lang.String line)`
`void` | `flush()`
`GetlineCompleter` | `getCompleter()`
`java.util.Collection` | `getCompletions()`
`PrintfFormat` | `getFormatter()`
`boolean` | `isPidCompleter()`
`abstract void` | `output(java.lang.String[] args)`
`void` | `printf(java.util.List items)`
`void` | `printf(java.lang.Object[] items)`
`void` | `printf(java.lang.String format, java.lang.Object[] items)`
`void` | `println(java.lang.String line)`
`void` | `processCommand(java.lang.String[] args)` Handle a command.
`void` | `setOutputFormat(java.lang.String format)`
`java.lang.String` | `sprintf(java.lang.String format, java.lang.Object[] items)`
`protected boolean` | `validateArgs(java.lang.String[] args)`

Methods inherited from class org.hyperic.sigar.shell.ShellCommandBase
`getCommandName, getErrStream, getOutStream, getShell, getSyntax, getSyntaxArgs, getUsageHelp, getUsageShort, init`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### shell

    protected Shell shell

### out

    protected java.io.PrintStream out

### err

    protected java.io.PrintStream err

### sigar

    protected Sigar sigar

### proxy

    protected SigarProxy proxy

### output

    protected java.util.List output

Constructor Detail

### SigarCommandBase

    public SigarCommandBase(Shell shell)

### SigarCommandBase

    public SigarCommandBase()

Method Detail

### setOutputFormat

    public void setOutputFormat(java.lang.String format)

### getFormatter

    public PrintfFormat getFormatter()

### sprintf

    public java.lang.String sprintf(java.lang.String format,
                                    java.lang.Object[] items)

### printf

    public void printf(java.lang.String format,
                       java.lang.Object[] items)

### printf

    public void printf(java.lang.Object[] items)

### printf

    public void printf(java.util.List items)

### println

    public void println(java.lang.String line)

### flush

    public void flush()

### output

    public abstract void output(java.lang.String[] args)
                         throws SigarException

  Throws:
    `SigarException`

### validateArgs

    protected boolean validateArgs(java.lang.String[] args)

### processCommand

    public void processCommand(java.lang.String[] args)
                        throws ShellCommandUsageException,
                               ShellCommandExecException

  Description copied from interface: `ShellCommandHandler`
  Handle a command.

  Specified by:
    `processCommand` in interface `ShellCommandHandler`
  Overrides:
    `processCommand` in class `ShellCommandBase`
  Parameters:
    `args` - The args to the command.
  Throws:
    `ShellCommandUsageException` - If the args are malformed.
    `ShellCommandExecException` - If an error occurred executing the command.

### getCompletions

    public java.util.Collection getCompletions()

### getCompleter

    public GetlineCompleter getCompleter()

### isPidCompleter

    public boolean isPidCompleter()

### completePid

    public java.lang.String completePid(java.lang.String line)

### complete

    public java.lang.String complete(java.lang.String line)

  Specified by:
    `complete` in interface `GetlineCompleter`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright ? 2004-2009 Hyperic. All Rights Reserved.