The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_13) on Thu Jul 09 06:46:51 PDT 2009 -->
<TITLE>
ShellCommandHandler (Sigar API)
</TITLE>

<META NAME="date" CONTENT="2009-07-09">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="ShellCommandHandler (Sigar API)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/hyperic/sigar/shell/ShellCommandExecException.html" title="class in org.hyperic.sigar.shell"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/hyperic/sigar/shell/ShellCommandInitException.html" title="class in org.hyperic.sigar.shell"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?org/hyperic/sigar/shell/ShellCommandHandler.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="ShellCommandHandler.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.hyperic.sigar.shell</FONT>
<BR>
Interface ShellCommandHandler</H2>
<DL>
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../org/hyperic/sigar/cmd/CpuInfo.html" title="class in org.hyperic.sigar.cmd">CpuInfo</A>, <A HREF="../../../../org/hyperic/sigar/cmd/Df.html" title="class in org.hyperic.sigar.cmd">Df</A>, <A HREF="../../../../org/hyperic/sigar/cmd/Du.html" title="class in org.hyperic.sigar.cmd">Du</A>, <A HREF="../../../../org/hyperic/sigar/cmd/FileVersionInfo.html" title="class in org.hyperic.sigar.cmd">FileVersionInfo</A>, <A HREF="../../../../org/hyperic/sigar/cmd/Free.html" title="class in org.hyperic.sigar.cmd">Free</A>, <A HREF="../../../../org/hyperic/sigar/cmd/Ifconfig.html" title="class in org.hyperic.sigar.cmd">Ifconfig</A>, <A HREF="../../../../org/hyperic/sigar/cmd/Iostat.html" title="class in org.hyperic.sigar.cmd">Iostat</A>, <A HREF="../../../../org/hyperic/sigar/cmd/Kill.html" title="class in org.hyperic.sigar.cmd">Kill</A>, <A HREF="../../../../org/hyperic/sigar/cmd/Ls.html" title="class in org.hyperic.sigar.cmd">Ls</A>, <A HREF="../../../../org/hyperic/sigar/cmd/MultiPs.html" title="class in org.hyperic.sigar.cmd">MultiPs</A>, <A HREF="../../../../org/hyperic/sigar/shell/MultiwordShellCommand.html" title="class in org.hyperic.sigar.shell">MultiwordShellCommand</A>, <A HREF="../../../../org/hyperic/sigar/cmd/NetInfo.html" title="class in org.hyperic.sigar.cmd">NetInfo</A>, <A HREF="../../../../org/hyperic/sigar/cmd/Netstat.html" title="class in org.hyperic.sigar.cmd">Netstat</A>, <A HREF="../../../../org/hyperic/sigar/cmd/Nfsstat.html" title="class in org.hyperic.sigar.cmd">Nfsstat</A>, <A HREF="../../../../org/hyperic/sigar/cmd/Pidof.html" title="class in org.hyperic.sigar.cmd">Pidof</A>, <A HREF="../../../../org/hyperic/sigar/cmd/ProcFileInfo.html" title="class in org.hyperic.sigar.cmd">ProcFileInfo</A>, <A HREF="../../../../org/hyperic/sigar/cmd/ProcInfo.html" title="class in org.hyperic.sigar.cmd">ProcInfo</A>, <A HREF="../../../../org/hyperic/sigar/cmd/ProcModuleInfo.html" title="class in org.hyperic.sigar.cmd">ProcModuleInfo</A>, <A HREF="../../../../org/hyperic/sigar/cmd/Ps.html" title="class in org.hyperic.sigar.cmd">Ps</A>, <A HREF="../../../../org/hyperic/sigar/cmd/Route.html" title="class in org.hyperic.sigar.cmd">Route</A>, <A HREF="../../../../org/hyperic/sigar/shell/ShellCommand_alias.html" title="class in org.hyperic.sigar.shell">ShellCommand_alias</A>, <A HREF="../../../../org/hyperic/sigar/shell/ShellCommand_get.html" title="class in org.hyperic.sigar.shell">ShellCommand_get</A>, <A HREF="../../../../org/hyperic/sigar/shell/ShellCommand_help.html" title="class in org.hyperic.sigar.shell">ShellCommand_help</A>, <A HREF="../../../../org/hyperic/sigar/shell/ShellCommand_quit.html" title="class in org.hyperic.sigar.shell">ShellCommand_quit</A>, <A HREF="../../../../org/hyperic/sigar/shell/ShellCommand_set.html" title="class in org.hyperic.sigar.shell">ShellCommand_set</A>, <A HREF="../../../../org/hyperic/sigar/shell/ShellCommand_sleep.html" title="class in org.hyperic.sigar.shell">ShellCommand_sleep</A>, <A HREF="../../../../org/hyperic/sigar/shell/ShellCommand_source.html" title="class in org.hyperic.sigar.shell">ShellCommand_source</A>, <A HREF="../../../../org/hyperic/sigar/shell/ShellCommandBase.html" title="class in org.hyperic.sigar.shell">ShellCommandBase</A>, <A HREF="../../../../org/hyperic/sigar/cmd/ShowArgs.html" title="class in org.hyperic.sigar.cmd">ShowArgs</A>, <A HREF="../../../../org/hyperic/sigar/cmd/ShowEnv.html" title="class in org.hyperic.sigar.cmd">ShowEnv</A>, <A HREF="../../../../org/hyperic/sigar/cmd/SigarCommandBase.html" title="class in org.hyperic.sigar.cmd">SigarCommandBase</A>, <A HREF="../../../../org/hyperic/sigar/cmd/SysInfo.html" title="class in org.hyperic.sigar.cmd">SysInfo</A>, <A HREF="../../../../org/hyperic/sigar/cmd/Time.html" title="class in org.hyperic.sigar.cmd">Time</A>, <A HREF="../../../../org/hyperic/sigar/cmd/Ulimit.html" title="class in org.hyperic.sigar.cmd">Ulimit</A>, <A HREF="../../../../org/hyperic/sigar/cmd/Uptime.html" title="class in org.hyperic.sigar.cmd">Uptime</A>, <A HREF="../../../../org/hyperic/sigar/cmd/Version.html" title="class in org.hyperic.sigar.cmd">Version</A>, <A HREF="../../../../org/hyperic/sigar/cmd/Who.html" title="class in org.hyperic.sigar.cmd">Who</A>, <A HREF="../../../../org/hyperic/sigar/cmd/Win32Service.html" title="class in org.hyperic.sigar.cmd">Win32Service</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <B>ShellCommandHandler</B></DL>
</PRE>

<P>
<HR>

<P>

<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/hyperic/sigar/shell/ShellCommandHandler.html#getSyntax()">getSyntax</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a description of the syntax for how a command should be invoked.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/hyperic/sigar/shell/ShellCommandHandler.html#getUsageHelp(java.lang.String[])">getUsageHelp</A></B>(java.lang.String[]&nbsp;args)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get some info on how to invoke this command.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/hyperic/sigar/shell/ShellCommandHandler.html#getUsageShort()">getUsageShort</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a very brief (40 character) description of the command</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/hyperic/sigar/shell/ShellCommandHandler.html#init(java.lang.String, org.hyperic.sigar.shell.ShellBase)">init</A></B>(java.lang.String&nbsp;commandName,
     <A HREF="../../../../org/hyperic/sigar/shell/ShellBase.html" title="class in org.hyperic.sigar.shell">ShellBase</A>&nbsp;shell)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initialize this command handler.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/hyperic/sigar/shell/ShellCommandHandler.html#processCommand(java.lang.String[])">processCommand</A></B>(java.lang.String[]&nbsp;args)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Handle a command.</TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="init(java.lang.String, org.hyperic.sigar.shell.ShellBase)"><!-- --></A><H3>
init</H3>
<PRE>
void <B>init</B>(java.lang.String&nbsp;commandName,
          <A HREF="../../../../org/hyperic/sigar/shell/ShellBase.html" title="class in org.hyperic.sigar.shell">ShellBase</A>&nbsp;shell)
          throws <A HREF="../../../../org/hyperic/sigar/shell/ShellCommandInitException.html" title="class in org.hyperic.sigar.shell">ShellCommandInitException</A></PRE>
<DL>
<DD>Initialize this command handler.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>commandName</CODE> - The name of the command.<DD><CODE>shell</CODE> - The shell.  This is useful for command
 that need to be able to interpret other commands, like the "help" 
 command, and for commands that need to get additional user input,
 for example a login command that presents a password prompt.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/hyperic/sigar/shell/ShellCommandInitException.html" title="class in org.hyperic.sigar.shell">ShellCommandInitException</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="processCommand(java.lang.String[])"><!-- --></A><H3>
processCommand</H3>
<PRE>
void <B>processCommand</B>(java.lang.String[]&nbsp;args)
                    throws <A HREF="../../../../org/hyperic/sigar/shell/ShellCommandUsageException.html" title="class in org.hyperic.sigar.shell">ShellCommandUsageException</A>,
                           <A HREF="../../../../org/hyperic/sigar/shell/ShellCommandExecException.html" title="class in org.hyperic.sigar.shell">ShellCommandExecException</A></PRE>
<DL>
<DD>Handle a command.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>args</CODE> - The args to the command.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/hyperic/sigar/shell/ShellCommandUsageException.html" title="class in org.hyperic.sigar.shell">ShellCommandUsageException</A></CODE> - If the args are malformed.
<DD><CODE><A HREF="../../../../org/hyperic/sigar/shell/ShellCommandExecException.html" title="class in org.hyperic.sigar.shell">ShellCommandExecException</A></CODE> - If an error occurred
 executing the command.</DL>
</DD>
</DL>
<HR>

<A NAME="getUsageHelp(java.lang.String[])"><!-- --></A><H3>
getUsageHelp</H3>
<PRE>
java.lang.String <B>getUsageHelp</B>(java.lang.String[]&nbsp;args)</PRE>
<DL>
<DD>Get some info on how to invoke this command.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>Some usage information on how this command is 
 expected to be invoked.</DL>
</DD>
</DL>
<HR>

<A NAME="getUsageShort()"><!-- --></A><H3>
getUsageShort</H3>
<PRE>
java.lang.String <B>getUsageShort</B>()</PRE>
<DL>
<DD>Get a very brief (40 character) description of the command
<P>
<DD><DL>

<DT><B>Returns:</B><DD>A description of the command.</DL>
</DD>
</DL>
<HR>

<A NAME="getSyntax()"><!-- --></A><H3>
getSyntax</H3>
<PRE>
java.lang.String <B>getSyntax</B>()</PRE>
<DL>
<DD>Get a description of the syntax for how a command should be invoked.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>A description of the syntax</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/hyperic/sigar/shell/ShellCommandExecException.html" title="class in org.hyperic.sigar.shell"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/hyperic/sigar/shell/ShellCommandInitException.html" title="class in org.hyperic.sigar.shell"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?org/hyperic/sigar/shell/ShellCommandHandler.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="ShellCommandHandler.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright ? 2004-2009 <a target="_top" href="http://www.hyperic.com/">Hyperic</a>. All Rights Reserved.
</BODY>
</HTML>