<!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_26) on Wed May 16 02:00:59 UTC 2012 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
Server (Apache Hadoop HttpFS 2.0.0-alpha API)
</TITLE>

<META NAME="date" CONTENT="2012-05-16">

<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="Server (Apache Hadoop HttpFS 2.0.0-alpha 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="class-use/Server.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&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/apache/hadoop/lib/server/BaseService.html" title="class in org.apache.hadoop.lib.server"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/hadoop/lib/server/Server.Status.html" title="enum in org.apache.hadoop.lib.server"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?org/apache/hadoop/lib/server/Server.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Server.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;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&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.apache.hadoop.lib.server</FONT>
<BR>
Class Server</H2>
<PRE>
<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.hadoop.lib.server.Server</B>
</PRE>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/apache/hadoop/lib/servlet/ServerWebApp.html" title="class in org.apache.hadoop.lib.servlet">ServerWebApp</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.79"><B>Server</B></A><DT>extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
</PRE>

<P>
A Server class provides standard configuration, logging and <A HREF="../../../../../org/apache/hadoop/lib/server/Service.html" title="interface in org.apache.hadoop.lib.server"><CODE>Service</CODE></A>
 lifecyle management.
 <p/>
 A Server normally has a home directory, a configuration directory, a temp
 directory and logs directory.
 <p/>
 The Server configuration is loaded from 2 overlapped files,
 <code>#SERVER#-default.xml</code> and <code>#SERVER#-site.xml</code>. The
 default file is loaded from the classpath, the site file is laoded from the
 configuration directory.
 <p/>
 The Server collects all configuration properties prefixed with
 <code>#SERVER#</code>. The property names are then trimmed from the
 <code>#SERVER#</code> prefix.
 <p/>
 The Server log configuration is loaded from the
 <code>#SERVICE#-log4j.properties</code> file in the configuration directory.
 <p/>
 The lifecycle of server is defined in by <A HREF="../../../../../org/apache/hadoop/lib/server/Server.Status.html" title="enum in org.apache.hadoop.lib.server"><CODE>Server.Status</CODE></A> enum.
 When a server is create, its status is UNDEF, when being initialized it is
 BOOTING, once initialization is complete by default transitions to NORMAL.
 The <code>#SERVER#.startup.status</code> configuration property can be used
 to specify a different startup status (NORMAL, ADMIN or HALTED).
 <p/>
 Services classes are defined in the <code>#SERVER#.services</code> and
 <code>#SERVER#.services.ext</code> properties. They are loaded in order
 (services first, then services.ext).
 <p/>
 Before initializing the services, they are traversed and duplicate service
 interface are removed from the service list. The last service using a given
 interface wins (this enables a simple override mechanism).
 <p/>
 After the services have been resoloved by interface de-duplication they are
 initialized in order. Once all services are initialized they are
 post-initialized (this enables late/conditional service bindings).
 <p/>
<P>

<P>
<HR>

<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->

<A NAME="nested_class_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>Nested Class Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/lib/server/Server.Status.html" title="enum in org.apache.hadoop.lib.server">Server.Status</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Enumeration that defines the server status.</TD>
</TR>
</TABLE>
&nbsp;<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_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>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/lib/server/Server.html#CONF_SERVICES">CONF_SERVICES</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Server property name that defines the service classes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/lib/server/Server.html#CONF_SERVICES_EXT">CONF_SERVICES_EXT</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Server property name that defines the service extension classes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/lib/server/Server.html#CONF_STARTUP_STATUS">CONF_STARTUP_STATUS</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Server property name that defines server startup status.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/lib/server/Server.html#DEFAULT_LOG4J_PROPERTIES">DEFAULT_LOG4J_PROPERTIES</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name of the log4j configuration file the Server will load from the
 classpath if the <code>#SERVER#-log4j.properties</code> is not defined
 in the server configuration directory.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_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>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/lib/server/Server.html#Server(java.lang.String, java.lang.String)">Server</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name,
             <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;homeDir)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a server instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/lib/server/Server.html#Server(java.lang.String, java.lang.String, org.apache.hadoop.conf.Configuration)">Server</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name,
             <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;homeDir,
             org.apache.hadoop.conf.Configuration&nbsp;config)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a server instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/lib/server/Server.html#Server(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)">Server</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name,
             <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;homeDir,
             <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;configDir,
             <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;logDir,
             <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;tempDir)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a server instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/lib/server/Server.html#Server(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.hadoop.conf.Configuration)">Server</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name,
             <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;homeDir,
             <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;configDir,
             <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;logDir,
             <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;tempDir,
             org.apache.hadoop.conf.Configuration&nbsp;config)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a server instance.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== 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>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/lib/server/Server.html#checkServiceDependencies(org.apache.hadoop.lib.server.Service)">checkServiceDependencies</A></B>(<A HREF="../../../../../org/apache/hadoop/lib/server/Service.html" title="interface in org.apache.hadoop.lib.server">Service</A>&nbsp;service)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks if all service dependencies of a service are available.</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/apache/hadoop/lib/server/Server.html#destroy()">destroy</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Destroys the server.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/lib/server/Server.html#destroyServices()">destroyServices</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Destroys the server services.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/lib/server/Server.html#ensureOperational()">ensureOperational</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Verifies the server is operational.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;T&gt; T</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/lib/server/Server.html#get(java.lang.Class)">get</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;T&gt;&nbsp;serviceKlass)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the <A HREF="../../../../../org/apache/hadoop/lib/server/Service.html" title="interface in org.apache.hadoop.lib.server"><CODE>Service</CODE></A> associated to the specified interface.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;org.apache.hadoop.conf.Configuration</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/lib/server/Server.html#getConfig()">getConfig</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the server configuration.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/lib/server/Server.html#getConfigDir()">getConfigDir</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the server config dir.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/lib/server/Server.html#getHomeDir()">getHomeDir</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the server home dir.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/lib/server/Server.html#getLogDir()">getLogDir</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the server log dir.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/lib/server/Server.html#getName()">getName</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the name of the server.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/lib/server/Server.html#getPrefix()">getPrefix</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the server prefix for server configuration properties.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/lib/server/Server.html#getPrefixedName(java.lang.String)">getPrefixedName</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the prefixed name of a server property.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../org/apache/hadoop/lib/server/Server.Status.html" title="enum in org.apache.hadoop.lib.server">Server.Status</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/lib/server/Server.html#getStatus()">getStatus</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the current server status.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/lib/server/Server.html#getTempDir()">getTempDir</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the server temp dir.</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/apache/hadoop/lib/server/Server.html#init()">init</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initializes the Server.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/lib/server/Server.html#initConfig()">initConfig</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loads and inializes the server configuration.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/lib/server/Server.html#initLog()">initLog</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initializes Log4j logging.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/lib/server/Server.html#initServices(java.util.List)">initServices</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;<A HREF="../../../../../org/apache/hadoop/lib/server/Service.html" title="interface in org.apache.hadoop.lib.server">Service</A>&gt;&nbsp;services)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initializes the list of services.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;<A HREF="../../../../../org/apache/hadoop/lib/server/Service.html" title="interface in org.apache.hadoop.lib.server">Service</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/lib/server/Server.html#loadServices()">loadServices</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loads services defined in <code>services</code> and
 <code>services.ext</code> and de-dups them.</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/apache/hadoop/lib/server/Server.html#setService(java.lang.Class)">setService</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;? extends <A HREF="../../../../../org/apache/hadoop/lib/server/Service.html" title="interface in org.apache.hadoop.lib.server">Service</A>&gt;&nbsp;klass)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a service programmatically.</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/apache/hadoop/lib/server/Server.html#setStatus(org.apache.hadoop.lib.server.Server.Status)">setStatus</A></B>(<A HREF="../../../../../org/apache/hadoop/lib/server/Server.Status.html" title="enum in org.apache.hadoop.lib.server">Server.Status</A>&nbsp;status)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets a new server status.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_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>Field Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="CONF_SERVICES"><!-- --></A><H3>
CONF_SERVICES</H3>
<PRE>
public static final <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.85"><B>CONF_SERVICES</B></A></PRE>
<DL>
<DD>Server property name that defines the service classes.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.hadoop.lib.server.Server.CONF_SERVICES">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="CONF_SERVICES_EXT"><!-- --></A><H3>
CONF_SERVICES_EXT</H3>
<PRE>
public static final <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.90"><B>CONF_SERVICES_EXT</B></A></PRE>
<DL>
<DD>Server property name that defines the service extension classes.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.hadoop.lib.server.Server.CONF_SERVICES_EXT">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="CONF_STARTUP_STATUS"><!-- --></A><H3>
CONF_STARTUP_STATUS</H3>
<PRE>
public static final <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.95"><B>CONF_STARTUP_STATUS</B></A></PRE>
<DL>
<DD>Server property name that defines server startup status.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.hadoop.lib.server.Server.CONF_STARTUP_STATUS">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="DEFAULT_LOG4J_PROPERTIES"><!-- --></A><H3>
DEFAULT_LOG4J_PROPERTIES</H3>
<PRE>
public static final <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.139"><B>DEFAULT_LOG4J_PROPERTIES</B></A></PRE>
<DL>
<DD>Name of the log4j configuration file the Server will load from the
 classpath if the <code>#SERVER#-log4j.properties</code> is not defined
 in the server configuration directory.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.hadoop.lib.server.Server.DEFAULT_LOG4J_PROPERTIES">Constant Field Values</A></DL>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_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>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="Server(java.lang.String, java.lang.String)"><!-- --></A><H3>
Server</H3>
<PRE>
public <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.158"><B>Server</B></A>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name,
              <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;homeDir)</PRE>
<DL>
<DD>Creates a server instance.
 <p/>
 The config, log and temp directories are all under the specified home directory.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - server name.<DD><CODE>homeDir</CODE> - server home directory.</DL>
</DL>
<HR>

<A NAME="Server(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>
Server</H3>
<PRE>
public <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.171"><B>Server</B></A>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name,
              <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;homeDir,
              <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;configDir,
              <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;logDir,
              <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;tempDir)</PRE>
<DL>
<DD>Creates a server instance.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - server name.<DD><CODE>homeDir</CODE> - server home directory.<DD><CODE>configDir</CODE> - config directory.<DD><CODE>logDir</CODE> - log directory.<DD><CODE>tempDir</CODE> - temp directory.</DL>
</DL>
<HR>

<A NAME="Server(java.lang.String, java.lang.String, org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
Server</H3>
<PRE>
public <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.186"><B>Server</B></A>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name,
              <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;homeDir,
              org.apache.hadoop.conf.Configuration&nbsp;config)</PRE>
<DL>
<DD>Creates a server instance.
 <p/>
 The config, log and temp directories are all under the specified home directory.
 <p/>
 It uses the provided configuration instead loading it from the config dir.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - server name.<DD><CODE>homeDir</CODE> - server home directory.<DD><CODE>config</CODE> - server configuration.</DL>
</DL>
<HR>

<A NAME="Server(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
Server</H3>
<PRE>
public <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.202"><B>Server</B></A>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name,
              <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;homeDir,
              <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;configDir,
              <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;logDir,
              <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;tempDir,
              org.apache.hadoop.conf.Configuration&nbsp;config)</PRE>
<DL>
<DD>Creates a server instance.
 <p/>
 It uses the provided configuration instead loading it from the config dir.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - server name.<DD><CODE>homeDir</CODE> - server home directory.<DD><CODE>configDir</CODE> - config directory.<DD><CODE>logDir</CODE> - log directory.<DD><CODE>tempDir</CODE> - temp directory.<DD><CODE>config</CODE> - server configuration.</DL>
</DL>

<!-- ============ 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="getStatus()"><!-- --></A><H3>
getStatus</H3>
<PRE>
public <A HREF="../../../../../org/apache/hadoop/lib/server/Server.Status.html" title="enum in org.apache.hadoop.lib.server">Server.Status</A> <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.244"><B>getStatus</B></A>()</PRE>
<DL>
<DD>Returns the current server status.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the current server status.</DL>
</DD>
</DL>
<HR>

<A NAME="setStatus(org.apache.hadoop.lib.server.Server.Status)"><!-- --></A><H3>
setStatus</H3>
<PRE>
public void <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.262"><B>setStatus</B></A>(<A HREF="../../../../../org/apache/hadoop/lib/server/Server.Status.html" title="enum in org.apache.hadoop.lib.server">Server.Status</A>&nbsp;status)
               throws <A HREF="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</A></PRE>
<DL>
<DD>Sets a new server status.
 <p/>
 The status must be settable.
 <p/>
 All services will be notified o the status change via the
 <A HREF="../../../../../org/apache/hadoop/lib/server/Service.html#serverStatusChange(org.apache.hadoop.lib.server.Server.Status, org.apache.hadoop.lib.server.Server.Status)"><CODE>Service.serverStatusChange(Server.Status, Server.Status)</CODE></A> method. If a service
 throws an exception during the notification, the server will be destroyed.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>status</CODE> - status to set.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</A></CODE> - thrown if the service has been destroy because of
 a failed notification to a service.</DL>
</DD>
</DL>
<HR>

<A NAME="ensureOperational()"><!-- --></A><H3>
ensureOperational</H3>
<PRE>
protected void <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.290"><B>ensureOperational</B></A>()</PRE>
<DL>
<DD>Verifies the server is operational.
<P>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - thrown if the server is not operational.</DL>
</DD>
</DL>
<HR>

<A NAME="init()"><!-- --></A><H3>
init</H3>
<PRE>
public void <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.338"><B>init</B></A>()
          throws <A HREF="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</A></PRE>
<DL>
<DD>Initializes the Server.
 <p/>
 The initialization steps are:
 <ul>
 <li>It verifies the service home and temp directories exist</li>
 <li>Loads the Server <code>#SERVER#-default.xml</code>
 configuration file from the classpath</li>
 <li>Initializes log4j logging. If the
 <code>#SERVER#-log4j.properties</code> file does not exist in the config
 directory it load <code>default-log4j.properties</code> from the classpath
 </li>
 <li>Loads the <code>#SERVER#-site.xml</code> file from the server config
 directory and merges it with the default configuration.</li>
 <li>Loads the services</li>
 <li>Initializes the services</li>
 <li>Post-initializes the services</li>
 <li>Sets the server startup status</li>
<P>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</A></CODE> - thrown if the server could not be initialized.</DL>
</DD>
</DL>
<HR>

<A NAME="initLog()"><!-- --></A><H3>
initLog</H3>
<PRE>
protected void <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.407"><B>initLog</B></A>()
                throws <A HREF="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</A></PRE>
<DL>
<DD>Initializes Log4j logging.
<P>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</A></CODE> - thrown if Log4j could not be initialized.</DL>
</DD>
</DL>
<HR>

<A NAME="initConfig()"><!-- --></A><H3>
initConfig</H3>
<PRE>
protected void <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.433"><B>initConfig</B></A>()
                   throws <A HREF="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</A></PRE>
<DL>
<DD>Loads and inializes the server configuration.
<P>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</A></CODE> - thrown if the configuration could not be loaded/initialized.</DL>
</DD>
</DL>
<HR>

<A NAME="loadServices()"><!-- --></A><H3>
loadServices</H3>
<PRE>
protected <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;<A HREF="../../../../../org/apache/hadoop/lib/server/Service.html" title="interface in org.apache.hadoop.lib.server">Service</A>&gt; <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.537"><B>loadServices</B></A>()
                              throws <A HREF="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</A></PRE>
<DL>
<DD>Loads services defined in <code>services</code> and
 <code>services.ext</code> and de-dups them.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>List of final services to initialize.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</A></CODE> - throw if the services could not be loaded.</DL>
</DD>
</DL>
<HR>

<A NAME="initServices(java.util.List)"><!-- --></A><H3>
initServices</H3>
<PRE>
protected void <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.572"><B>initServices</B></A>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A>&lt;<A HREF="../../../../../org/apache/hadoop/lib/server/Service.html" title="interface in org.apache.hadoop.lib.server">Service</A>&gt;&nbsp;services)
                     throws <A HREF="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</A></PRE>
<DL>
<DD>Initializes the list of services.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>services</CODE> - services to initialized, it must be a de-dupped list of
 services.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</A></CODE> - thrown if the services could not be initialized.</DL>
</DD>
</DL>
<HR>

<A NAME="checkServiceDependencies(org.apache.hadoop.lib.server.Service)"><!-- --></A><H3>
checkServiceDependencies</H3>
<PRE>
protected void <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.591"><B>checkServiceDependencies</B></A>(<A HREF="../../../../../org/apache/hadoop/lib/server/Service.html" title="interface in org.apache.hadoop.lib.server">Service</A>&nbsp;service)
                                 throws <A HREF="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</A></PRE>
<DL>
<DD>Checks if all service dependencies of a service are available.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>service</CODE> - service to check if all its dependencies are available.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</A></CODE> - thrown if a service dependency is missing.</DL>
</DD>
</DL>
<HR>

<A NAME="destroyServices()"><!-- --></A><H3>
destroyServices</H3>
<PRE>
protected void <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.604"><B>destroyServices</B></A>()</PRE>
<DL>
<DD>Destroys the server services.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="destroy()"><!-- --></A><H3>
destroy</H3>
<PRE>
public void <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.625"><B>destroy</B></A>()</PRE>
<DL>
<DD>Destroys the server.
 <p/>
 All services are destroyed in reverse order of initialization, then the
 Log4j framework is shutdown.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getName()"><!-- --></A><H3>
getName</H3>
<PRE>
public <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.641"><B>getName</B></A>()</PRE>
<DL>
<DD>Returns the name of the server.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the server name.</DL>
</DD>
</DL>
<HR>

<A NAME="getPrefix()"><!-- --></A><H3>
getPrefix</H3>
<PRE>
public <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.652"><B>getPrefix</B></A>()</PRE>
<DL>
<DD>Returns the server prefix for server configuration properties.
 <p/>
 By default it is the server name.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the prefix for server configuration properties.</DL>
</DD>
</DL>
<HR>

<A NAME="getPrefixedName(java.lang.String)"><!-- --></A><H3>
getPrefixedName</H3>
<PRE>
public <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.663"><B>getPrefixedName</B></A>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name)</PRE>
<DL>
<DD>Returns the prefixed name of a server property.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - of the property.
<DT><B>Returns:</B><DD>prefixed name of the property.</DL>
</DD>
</DL>
<HR>

<A NAME="getHomeDir()"><!-- --></A><H3>
getHomeDir</H3>
<PRE>
public <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.672"><B>getHomeDir</B></A>()</PRE>
<DL>
<DD>Returns the server home dir.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the server home dir.</DL>
</DD>
</DL>
<HR>

<A NAME="getConfigDir()"><!-- --></A><H3>
getConfigDir</H3>
<PRE>
public <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.681"><B>getConfigDir</B></A>()</PRE>
<DL>
<DD>Returns the server config dir.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the server config dir.</DL>
</DD>
</DL>
<HR>

<A NAME="getLogDir()"><!-- --></A><H3>
getLogDir</H3>
<PRE>
public <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.690"><B>getLogDir</B></A>()</PRE>
<DL>
<DD>Returns the server log dir.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the server log dir.</DL>
</DD>
</DL>
<HR>

<A NAME="getTempDir()"><!-- --></A><H3>
getTempDir</H3>
<PRE>
public <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.699"><B>getTempDir</B></A>()</PRE>
<DL>
<DD>Returns the server temp dir.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the server temp dir.</DL>
</DD>
</DL>
<HR>

<A NAME="getConfig()"><!-- --></A><H3>
getConfig</H3>
<PRE>
public org.apache.hadoop.conf.Configuration <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.708"><B>getConfig</B></A>()</PRE>
<DL>
<DD>Returns the server configuration.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the server configuration.</DL>
</DD>
</DL>
<HR>

<A NAME="get(java.lang.Class)"><!-- --></A><H3>
get</H3>
<PRE>
public &lt;T&gt; T <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.721"><B>get</B></A>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;T&gt;&nbsp;serviceKlass)</PRE>
<DL>
<DD>Returns the <A HREF="../../../../../org/apache/hadoop/lib/server/Service.html" title="interface in org.apache.hadoop.lib.server"><CODE>Service</CODE></A> associated to the specified interface.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>serviceKlass</CODE> - service interface.
<DT><B>Returns:</B><DD>the service implementation.</DL>
</DD>
</DL>
<HR>

<A NAME="setService(java.lang.Class)"><!-- --></A><H3>
setService</H3>
<PRE>
public void <A HREF="../../../../../src-html/org/apache/hadoop/lib/server/Server.html#line.740"><B>setService</B></A>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;? extends <A HREF="../../../../../org/apache/hadoop/lib/server/Service.html" title="interface in org.apache.hadoop.lib.server">Service</A>&gt;&nbsp;klass)
                throws <A HREF="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</A></PRE>
<DL>
<DD>Adds a service programmatically.
 <p/>
 If a service with the same interface exists, it will be destroyed and
 removed before the given one is initialized and added.
 <p/>
 If an exception is thrown the server is destroyed.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>klass</CODE> - service class to add.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../org/apache/hadoop/lib/server/ServerException.html" title="class in org.apache.hadoop.lib.server">ServerException</A></CODE> - throw if the service could not initialized/added
 to the server.</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="class-use/Server.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&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/apache/hadoop/lib/server/BaseService.html" title="class in org.apache.hadoop.lib.server"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/hadoop/lib/server/Server.Status.html" title="enum in org.apache.hadoop.lib.server"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?org/apache/hadoop/lib/server/Server.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Server.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;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright &#169; 2012 <a href="http://www.apache.org">Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>
