view apache-xmlrpc-3.1.3/docs/apidocs/org/apache/xmlrpc/webserver/WebServer.html @ 151:db5f735fd2b4

add xml-rpc.jar
author e085711
date Sat, 10 Sep 2011 04:13:50 +0900
parents
children
line wrap: on
line source

<!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_17) on Sat Feb 06 17:11:29 CET 2010 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
WebServer (Apache XML-RPC 3.1.3 API)
</TITLE>

<META NAME="date" CONTENT="2010-02-06">

<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="WebServer (Apache XML-RPC 3.1.3 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/WebServer.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/xmlrpc/webserver/ServletWebServer.Exception.html" title="class in org.apache.xmlrpc.webserver"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/xmlrpc/webserver/XmlRpcServlet.html" title="class in org.apache.xmlrpc.webserver"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?org/apache/xmlrpc/webserver/WebServer.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="WebServer.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;<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.xmlrpc.webserver</FONT>
<BR>
Class WebServer</H2>
<PRE>
java.lang.Object
  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.xmlrpc.webserver.WebServer</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>java.lang.Runnable</DD>
</DL>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../org/apache/xmlrpc/webserver/ServletWebServer.html" title="class in org.apache.xmlrpc.webserver">ServletWebServer</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>WebServer</B><DT>extends java.lang.Object<DT>implements java.lang.Runnable</DL>
</PRE>

<P>
<p>The <A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html" title="class in org.apache.xmlrpc.webserver"><CODE>WebServer</CODE></A> is a minimal HTTP server, that might be used
 as an embedded web server.</p>
 <p>Use of the <A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html" title="class in org.apache.xmlrpc.webserver"><CODE>WebServer</CODE></A> has grown very popular amongst users
 of Apache XML-RPC. Why this is the case, can hardly be explained,
 because the <A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html" title="class in org.apache.xmlrpc.webserver"><CODE>WebServer</CODE></A> is at best a workaround, compared to
 full blown servlet engines like Tomcat or Jetty. For example, under
 heavy load it will almost definitely be slower than a real servlet
 engine, because it does neither support proper keepalive (multiple
 requests per physical connection) nor chunked mode (in other words,
 it cannot stream requests).</p>
 <p>If you still insist in using the <A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html" title="class in org.apache.xmlrpc.webserver"><CODE>WebServer</CODE></A>, it is
 recommended to use its subclass, the <A HREF="../../../../org/apache/xmlrpc/webserver/ServletWebServer.html" title="class in org.apache.xmlrpc.webserver"><CODE>ServletWebServer</CODE></A> instead,
 which offers a minimal subset of the servlet API. In other words,
 you keep yourself the option to migrate to a real servlet engine
 later.</p>
 <p>Use of the <A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html" title="class in org.apache.xmlrpc.webserver"><CODE>WebServer</CODE></A> goes roughly like this: First of all,
 create a property file (for example "MyHandlers.properties") and
 add it to your jar file. The property keys are handler names and
 the property values are the handler classes. Once that is done,
 create an instance of WebServer:
 <pre>
   final int port = 8088;
   final String propertyFile = "MyHandler.properties";

   PropertyHandlerMapping mapping = new PropertyHandlerMapping();
   ClassLoader cl = Thread.currentThread().getContextClassLoader();
   mapping.load(cl, propertyFile);
   WebServer webServer = new WebServer(port);
   XmlRpcServerConfigImpl config = new XmlRpcServerConfigImpl();
   XmlRpcServer server = webServer.getXmlRpcServer();
   server.setConfig(config);
   server.setHandlerMapping(mapping);
   webServer.start();
 </pre>
<P>

<P>
<HR>

<P>
<!-- =========== 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>protected &nbsp;java.util.List</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#accept">accept</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.util.List</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#deny">deny</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../org/apache/xmlrpc/server/XmlRpcStreamServer.html" title="class in org.apache.xmlrpc.server">XmlRpcStreamServer</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#server">server</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.net.ServerSocket</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#serverSocket">serverSocket</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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/xmlrpc/webserver/WebServer.html#WebServer(int)">WebServer</A></B>(int&nbsp;pPort)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a web server at the specified port number.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#WebServer(int, java.net.InetAddress)">WebServer</A></B>(int&nbsp;pPort,
          java.net.InetAddress&nbsp;pAddr)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a web server at the specified port number and IP address.</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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#acceptClient(java.lang.String)">acceptClient</A></B>(java.lang.String&nbsp;pAddress)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add an IP address to the list of accepted clients.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#allowConnection(java.net.Socket)">allowConnection</A></B>(java.net.Socket&nbsp;s)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks incoming connections to see if they should be allowed.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.net.ServerSocket</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#createServerSocket(int, int, java.net.InetAddress)">createServerSocket</A></B>(int&nbsp;pPort,
                   int&nbsp;backlog,
                   java.net.InetAddress&nbsp;addr)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Factory method to manufacture the server socket.</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/xmlrpc/webserver/WebServer.html#denyClient(java.lang.String)">denyClient</A></B>(java.lang.String&nbsp;pAddress)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add an IP address to the list of denied clients.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#getPort()">getPort</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the port, on which the web server is running.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/xmlrpc/server/XmlRpcStreamServer.html" title="class in org.apache.xmlrpc.server">XmlRpcStreamServer</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#getXmlRpcServer()">getXmlRpcServer</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the <A HREF="../../../../org/apache/xmlrpc/server/XmlRpcServer.html" title="class in org.apache.xmlrpc.server"><CODE>XmlRpcServer</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#isParanoid()">isParanoid</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the client filtering state.</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/xmlrpc/webserver/WebServer.html#log(java.lang.String)">log</A></B>(java.lang.String&nbsp;pMessage)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Logs a message.</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/xmlrpc/webserver/WebServer.html#log(java.lang.Throwable)">log</A></B>(java.lang.Throwable&nbsp;pError)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Logs an error.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../org/apache/xmlrpc/util/ThreadPool.Task.html" title="interface in org.apache.xmlrpc.util">ThreadPool.Task</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#newTask(org.apache.xmlrpc.webserver.WebServer, org.apache.xmlrpc.server.XmlRpcStreamServer, java.net.Socket)">newTask</A></B>(<A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html" title="class in org.apache.xmlrpc.webserver">WebServer</A>&nbsp;pServer,
        <A HREF="../../../../org/apache/xmlrpc/server/XmlRpcStreamServer.html" title="class in org.apache.xmlrpc.server">XmlRpcStreamServer</A>&nbsp;pXmlRpcServer,
        java.net.Socket&nbsp;pSocket)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../org/apache/xmlrpc/util/ThreadPool.html" title="class in org.apache.xmlrpc.util">ThreadPool</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#newThreadPool()">newThreadPool</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../org/apache/xmlrpc/server/XmlRpcStreamServer.html" title="class in org.apache.xmlrpc.server">XmlRpcStreamServer</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#newXmlRpcStreamServer()">newXmlRpcStreamServer</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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/xmlrpc/webserver/WebServer.html#run()">run</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Listens for client requests until stopped.</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/xmlrpc/webserver/WebServer.html#setParanoid(boolean)">setParanoid</A></B>(boolean&nbsp;pParanoid)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Switch client filtering on/off.</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/xmlrpc/webserver/WebServer.html#shutdown()">shutdown</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stop listening on the server port.</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/xmlrpc/webserver/WebServer.html#start()">start</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Spawns a new thread which binds this server to the port it's
 configured to accept connections on.</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.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</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="serverSocket"><!-- --></A><H3>
serverSocket</H3>
<PRE>
protected java.net.ServerSocket <B>serverSocket</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>

<A NAME="accept"><!-- --></A><H3>
accept</H3>
<PRE>
protected final java.util.List <B>accept</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>

<A NAME="deny"><!-- --></A><H3>
deny</H3>
<PRE>
protected final java.util.List <B>deny</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>

<A NAME="server"><!-- --></A><H3>
server</H3>
<PRE>
protected final <A HREF="../../../../org/apache/xmlrpc/server/XmlRpcStreamServer.html" title="class in org.apache.xmlrpc.server">XmlRpcStreamServer</A> <B>server</B></PRE>
<DL>
<DL>
</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="WebServer(int)"><!-- --></A><H3>
WebServer</H3>
<PRE>
public <B>WebServer</B>(int&nbsp;pPort)</PRE>
<DL>
<DD>Creates a web server at the specified port number.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>pPort</CODE> - Port number; 0 for a random port, choosen by the
 operating system.</DL>
</DL>
<HR>

<A NAME="WebServer(int, java.net.InetAddress)"><!-- --></A><H3>
WebServer</H3>
<PRE>
public <B>WebServer</B>(int&nbsp;pPort,
                 java.net.InetAddress&nbsp;pAddr)</PRE>
<DL>
<DD>Creates a web server at the specified port number and IP address.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>pPort</CODE> - Port number; 0 for a random port, choosen by the
 operating system.<DD><CODE>pAddr</CODE> - Local IP address; null for all available IP addresses.</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="newXmlRpcStreamServer()"><!-- --></A><H3>
newXmlRpcStreamServer</H3>
<PRE>
protected <A HREF="../../../../org/apache/xmlrpc/server/XmlRpcStreamServer.html" title="class in org.apache.xmlrpc.server">XmlRpcStreamServer</A> <B>newXmlRpcStreamServer</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="createServerSocket(int, int, java.net.InetAddress)"><!-- --></A><H3>
createServerSocket</H3>
<PRE>
protected java.net.ServerSocket <B>createServerSocket</B>(int&nbsp;pPort,
                                                   int&nbsp;backlog,
                                                   java.net.InetAddress&nbsp;addr)
                                            throws java.io.IOException</PRE>
<DL>
<DD>Factory method to manufacture the server socket.  Useful as a
 hook method for subclasses to override when they desire
 different flavor of socket (i.e. a <code>SSLServerSocket</code>).
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pPort</CODE> - Port number; 0 for a random port, choosen by the operating
 system.<DD><CODE>backlog</CODE> - <DD><CODE>addr</CODE> - If <code>null</code>, binds to
 <code>INADDR_ANY</code>, meaning that all network interfaces on
 a multi-homed host will be listening.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - Error creating listener socket.</DL>
</DD>
</DL>
<HR>

<A NAME="start()"><!-- --></A><H3>
start</H3>
<PRE>
public void <B>start</B>()
           throws java.io.IOException</PRE>
<DL>
<DD>Spawns a new thread which binds this server to the port it's
 configured to accept connections on.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - Binding the server socket failed.<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#run()"><CODE>run()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setParanoid(boolean)"><!-- --></A><H3>
setParanoid</H3>
<PRE>
public void <B>setParanoid</B>(boolean&nbsp;pParanoid)</PRE>
<DL>
<DD>Switch client filtering on/off.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pParanoid</CODE> - True to enable filtering, false otherwise.<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#acceptClient(java.lang.String)"><CODE>acceptClient(java.lang.String)</CODE></A>, 
<A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#denyClient(java.lang.String)"><CODE>denyClient(java.lang.String)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="isParanoid()"><!-- --></A><H3>
isParanoid</H3>
<PRE>
protected boolean <B>isParanoid</B>()</PRE>
<DL>
<DD>Returns the client filtering state.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>True, if client filtering is enabled, false otherwise.<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#acceptClient(java.lang.String)"><CODE>acceptClient(java.lang.String)</CODE></A>, 
<A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#denyClient(java.lang.String)"><CODE>denyClient(java.lang.String)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="acceptClient(java.lang.String)"><!-- --></A><H3>
acceptClient</H3>
<PRE>
public void <B>acceptClient</B>(java.lang.String&nbsp;pAddress)</PRE>
<DL>
<DD>Add an IP address to the list of accepted clients. The parameter can
 contain '*' as wildcard character, e.g. "192.168.*.*". You must call
 setParanoid(true) in order for this to have any effect.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pAddress</CODE> - The IP address being enabled.
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - Parsing the address failed.<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#denyClient(java.lang.String)"><CODE>denyClient(java.lang.String)</CODE></A>, 
<A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#setParanoid(boolean)"><CODE>setParanoid(boolean)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="denyClient(java.lang.String)"><!-- --></A><H3>
denyClient</H3>
<PRE>
public void <B>denyClient</B>(java.lang.String&nbsp;pAddress)</PRE>
<DL>
<DD>Add an IP address to the list of denied clients. The parameter can
 contain '*' as wildcard character, e.g. "192.168.*.*". You must call
 setParanoid(true) in order for this to have any effect.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pAddress</CODE> - The IP address being disabled.
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - Parsing the address failed.<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#acceptClient(java.lang.String)"><CODE>acceptClient(java.lang.String)</CODE></A>, 
<A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#setParanoid(boolean)"><CODE>setParanoid(boolean)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="allowConnection(java.net.Socket)"><!-- --></A><H3>
allowConnection</H3>
<PRE>
protected boolean <B>allowConnection</B>(java.net.Socket&nbsp;s)</PRE>
<DL>
<DD>Checks incoming connections to see if they should be allowed.
 If not in paranoid mode, always returns true.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>s</CODE> - The socket to inspect.
<DT><B>Returns:</B><DD>Whether the connection should be allowed.</DL>
</DD>
</DL>
<HR>

<A NAME="newTask(org.apache.xmlrpc.webserver.WebServer, org.apache.xmlrpc.server.XmlRpcStreamServer, java.net.Socket)"><!-- --></A><H3>
newTask</H3>
<PRE>
protected <A HREF="../../../../org/apache/xmlrpc/util/ThreadPool.Task.html" title="interface in org.apache.xmlrpc.util">ThreadPool.Task</A> <B>newTask</B>(<A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html" title="class in org.apache.xmlrpc.webserver">WebServer</A>&nbsp;pServer,
                                  <A HREF="../../../../org/apache/xmlrpc/server/XmlRpcStreamServer.html" title="class in org.apache.xmlrpc.server">XmlRpcStreamServer</A>&nbsp;pXmlRpcServer,
                                  java.net.Socket&nbsp;pSocket)
                           throws java.io.IOException</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="run()"><!-- --></A><H3>
run</H3>
<PRE>
public void <B>run</B>()</PRE>
<DL>
<DD>Listens for client requests until stopped.  Call <A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#start()"><CODE>start()</CODE></A> to invoke this method, and <A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#shutdown()"><CODE>shutdown()</CODE></A> to
 break out of it.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>run</CODE> in interface <CODE>java.lang.Runnable</CODE></DL>
</DD>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE>java.lang.RuntimeException</CODE> - Generally caused by either an
 <code>UnknownHostException</code> or <code>BindException</code>
 with the vanilla web server.<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#start()"><CODE>start()</CODE></A>, 
<A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#shutdown()"><CODE>shutdown()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="newThreadPool()"><!-- --></A><H3>
newThreadPool</H3>
<PRE>
protected <A HREF="../../../../org/apache/xmlrpc/util/ThreadPool.html" title="class in org.apache.xmlrpc.util">ThreadPool</A> <B>newThreadPool</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="shutdown()"><!-- --></A><H3>
shutdown</H3>
<PRE>
public void <B>shutdown</B>()</PRE>
<DL>
<DD>Stop listening on the server port.  Shutting down our <A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#listener"><CODE>listener</CODE></A> effectively breaks it out of its <A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#run()"><CODE>run()</CODE></A>
 loop.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#run()"><CODE>run()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getPort()"><!-- --></A><H3>
getPort</H3>
<PRE>
public int <B>getPort</B>()</PRE>
<DL>
<DD>Returns the port, on which the web server is running.
 This method may be invoked after <A HREF="../../../../org/apache/xmlrpc/webserver/WebServer.html#start()"><CODE>start()</CODE></A> only.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>Servers port number</DL>
</DD>
</DL>
<HR>

<A NAME="log(java.lang.Throwable)"><!-- --></A><H3>
log</H3>
<PRE>
public void <B>log</B>(java.lang.Throwable&nbsp;pError)</PRE>
<DL>
<DD>Logs an error.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pError</CODE> - The error being logged.</DL>
</DD>
</DL>
<HR>

<A NAME="log(java.lang.String)"><!-- --></A><H3>
log</H3>
<PRE>
public void <B>log</B>(java.lang.String&nbsp;pMessage)</PRE>
<DL>
<DD>Logs a message.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pMessage</CODE> - The being logged.</DL>
</DD>
</DL>
<HR>

<A NAME="getXmlRpcServer()"><!-- --></A><H3>
getXmlRpcServer</H3>
<PRE>
public <A HREF="../../../../org/apache/xmlrpc/server/XmlRpcStreamServer.html" title="class in org.apache.xmlrpc.server">XmlRpcStreamServer</A> <B>getXmlRpcServer</B>()</PRE>
<DL>
<DD>Returns the <A HREF="../../../../org/apache/xmlrpc/server/XmlRpcServer.html" title="class in org.apache.xmlrpc.server"><CODE>XmlRpcServer</CODE></A>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>The server object.</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/WebServer.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/xmlrpc/webserver/ServletWebServer.Exception.html" title="class in org.apache.xmlrpc.webserver"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/xmlrpc/webserver/XmlRpcServlet.html" title="class in org.apache.xmlrpc.webserver"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?org/apache/xmlrpc/webserver/WebServer.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="WebServer.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;<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; 2001-2010 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>