org.hyperic.sigar.cmd
Class Shell

java.lang.Object
  extended by org.hyperic.sigar.shell.ShellBase
      extended by org.hyperic.sigar.cmd.Shell
All Implemented Interfaces:
ShellCommandMapper, SIGINT, GetlineCompleter

public class Shell
extends ShellBase

The Sigar Shell provides a command shell for running the example commands and Sigar tests.


Field Summary
static java.lang.String RCFILE_NAME
           
 
Fields inherited from class org.hyperic.sigar.shell.ShellBase
err, gl, out, PROP_PAGE_SIZE
 
Constructor Summary
Shell()
           
 
Method Summary
static void clearScreen()
           
 long[] findPids(java.lang.String query)
           
 long[] findPids(java.lang.String[] args)
           
static long[] getPids(SigarProxy sigar, java.lang.String[] args)
           
 Sigar getSigar()
           
 SigarProxy getSigarProxy()
           
 java.lang.String getUserDeniedMessage(long pid)
           
 boolean isInteractive()
           
static void main(java.lang.String[] args)
           
 void processCommand(ShellCommandHandler handler, java.lang.String[] args)
           
 void readCommandFile(java.lang.String dir)
           
 void registerCommands()
           
 void setInteractive(boolean value)
           
 void shutdown()
           
 
Methods inherited from class org.hyperic.sigar.shell.ShellBase
complete, complete, getCommandNameIterator, getDefaultPageControl, getErrStream, getGetline, getHandler, getHiddenInput, getInput, getInput, getOutStream, getPageSize, handleCommand, handleCommand, handlerIsHidden, handleSIGINT, hasCompleter, init, initHistory, initHistory, isRedirected, performPaging, performPaging, readRCFile, registerCommandHandler, registerSigIntHandler, run, sendToErrStream, sendToOutStream, setHandlerHidden, setPageSize, setPrompt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RCFILE_NAME

public static final java.lang.String RCFILE_NAME
See Also:
Constant Field Values
Constructor Detail

Shell

public Shell()
Method Detail

clearScreen

public static void clearScreen()

getSigarProxy

public SigarProxy getSigarProxy()

getSigar

public Sigar getSigar()

isInteractive

public boolean isInteractive()

setInteractive

public void setInteractive(boolean value)

registerCommands

public void registerCommands()
                      throws ShellCommandInitException
Throws:
ShellCommandInitException

processCommand

public void processCommand(ShellCommandHandler handler,
                           java.lang.String[] args)
                    throws ShellCommandUsageException,
                           ShellCommandExecException
Overrides:
processCommand in class ShellBase
Throws:
ShellCommandUsageException
ShellCommandExecException

getPids

public static long[] getPids(SigarProxy sigar,
                             java.lang.String[] args)
                      throws SigarException
Throws:
SigarException

findPids

public long[] findPids(java.lang.String[] args)
                throws SigarException
Throws:
SigarException

findPids

public long[] findPids(java.lang.String query)
                throws SigarException
Throws:
SigarException

readCommandFile

public void readCommandFile(java.lang.String dir)

getUserDeniedMessage

public java.lang.String getUserDeniedMessage(long pid)

shutdown

public void shutdown()
Overrides:
shutdown in class ShellBase

main

public static void main(java.lang.String[] args)


Copyright ? 2004-2009 Hyperic. All Rights Reserved.