/lib/docs/org/apache/xmlrpc/server/RequestProcessorFactoryFactory.html
HTML | 289 lines | 238 code | 30 blank | 21 comment | 0 complexity | 9a4de138c70f881216ff68e5e9d578aa MD5 | raw file
Possible License(s): LGPL-3.0, Apache-2.0, GPL-3.0, GPL-2.0, AGPL-3.0, JSON, BSD-3-Clause
- <!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_0) on Mon Apr 20 21:46:00 CEST 2009 -->
- <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <TITLE>
- RequestProcessorFactoryFactory (Apache XML-RPC 3.1.2 API)
- </TITLE>
- <META NAME="date" CONTENT="2009-04-20">
- <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="RequestProcessorFactoryFactory (Apache XML-RPC 3.1.2 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> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
- <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/RequestProcessorFactoryFactory.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
- </TR>
- </TABLE>
- </TD>
- <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
- </EM>
- </TD>
- </TR>
- <TR>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../../org/apache/xmlrpc/server/ReflectiveXmlRpcHandler.html" title="class in org.apache.xmlrpc.server"><B>PREV CLASS</B></A>
- <A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.RequestProcessorFactory.html" title="interface in org.apache.xmlrpc.server"><B>NEXT CLASS</B></A></FONT></TD>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../../index.html?org/apache/xmlrpc/server/RequestProcessorFactoryFactory.html" target="_top"><B>FRAMES</B></A>
- <A HREF="RequestProcessorFactoryFactory.html" target="_top"><B>NO FRAMES</B></A>
- <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: <A HREF="#nested_class_summary">NESTED</A> | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- DETAIL: FIELD | CONSTR | <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.server</FONT>
- <BR>
- Interface RequestProcessorFactoryFactory</H2>
- <DL>
- <DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.RequestSpecificProcessorFactoryFactory.html" title="class in org.apache.xmlrpc.server">RequestProcessorFactoryFactory.RequestSpecificProcessorFactoryFactory</A>, <A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.StatelessProcessorFactoryFactory.html" title="class in org.apache.xmlrpc.server">RequestProcessorFactoryFactory.StatelessProcessorFactoryFactory</A></DD>
- </DL>
- <HR>
- <DL>
- <DT><PRE>public interface <B>RequestProcessorFactoryFactory</B></DL>
- </PRE>
- <P>
- <p>The request processor is the object, which is actually performing
- the request. There is nothing magic about the request processor:
- It may very well be a POJO. The <A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.html" title="interface in org.apache.xmlrpc.server"><CODE>RequestProcessorFactoryFactory</CODE></A>
- is passed to the <A HREF="../../../../org/apache/xmlrpc/server/AbstractReflectiveHandlerMapping.html" title="class in org.apache.xmlrpc.server"><CODE>AbstractReflectiveHandlerMapping</CODE></A> at startup.
- The mapping uses this factory to create instances of
- <A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.RequestProcessorFactory.html" title="interface in org.apache.xmlrpc.server"><CODE>RequestProcessorFactoryFactory.RequestProcessorFactory</CODE></A>, which are used to initialize
- the <A HREF="../../../../org/apache/xmlrpc/server/ReflectiveXmlRpcHandler.html" title="class in org.apache.xmlrpc.server"><CODE>ReflectiveXmlRpcHandler</CODE></A>. The handler in turn uses its
- factory to create the actual request processor when a request comes
- in.</p>
- <p>However, the question arises, when and how the request processor
- is created and whether it needs request specific initialization.
- The <A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.html" title="interface in org.apache.xmlrpc.server"><CODE>RequestProcessorFactoryFactory</CODE></A> is an object, which makes
- that logic pluggable. Unfortunately, we aren't done with a single
- factory: We even need a factory for factories. The rationale is
- best explained by looking at the different use cases and how to
- implement them.</p>
- <p>The default <A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.html" title="interface in org.apache.xmlrpc.server"><CODE>RequestProcessorFactoryFactory</CODE></A> is the
- <A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.RequestSpecificProcessorFactoryFactory.html" title="class in org.apache.xmlrpc.server"><CODE>RequestProcessorFactoryFactory.RequestSpecificProcessorFactoryFactory</CODE></A>. It creates a new
- processor instance for any request. In other words, it allows the
- request processor to have some state. This is fine, if the request
- processor is a lightweight object or needs request specific
- initialization. In this case, the actual request processor is
- created and invoked when
- calling <A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.RequestProcessorFactory.html#getRequestProcessor(org.apache.xmlrpc.XmlRpcRequest)"><CODE>RequestProcessorFactoryFactory.RequestProcessorFactory.getRequestProcessor(XmlRpcRequest)</CODE></A>.</p>
- <p>An alternative implementation is the
- <A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.StatelessProcessorFactoryFactory.html" title="class in org.apache.xmlrpc.server"><CODE>RequestProcessorFactoryFactory.StatelessProcessorFactoryFactory</CODE></A>, which may be used to
- create stateless request processors. Stateless request processors
- are typically heavyweight objects, which have an expensive
- initialization phase. The processor factory, which is created by
- <A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.html#getRequestProcessorFactory(java.lang.Class)"><CODE>getRequestProcessorFactory(Class pClass)</CODE></A> contains an
- initialized singleton, which is returned by
- <A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.RequestProcessorFactory.html#getRequestProcessor(org.apache.xmlrpc.XmlRpcRequest)"><CODE>RequestProcessorFactoryFactory.RequestProcessorFactory.getRequestProcessor(XmlRpcRequest)</CODE></A>.</p>
- <p>Other alternatives might be a
- <A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.html" title="interface in org.apache.xmlrpc.server"><CODE>RequestProcessorFactoryFactory</CODE></A>, which maintains a pool
- of <A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.RequestProcessorFactory.html" title="interface in org.apache.xmlrpc.server"><CODE>RequestProcessorFactoryFactory.RequestProcessorFactory</CODE></A> instances. The instances are
- configured by calling
- <A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.RequestProcessorFactory.html#getRequestProcessor(org.apache.xmlrpc.XmlRpcRequest)"><CODE>RequestProcessorFactoryFactory.RequestProcessorFactory.getRequestProcessor(XmlRpcRequest)</CODE></A>.</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 interface</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.RequestProcessorFactory.html" title="interface in org.apache.xmlrpc.server">RequestProcessorFactoryFactory.RequestProcessorFactory</A></B></CODE>
- <BR>
- This is the factory for request processors.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static class</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.RequestSpecificProcessorFactoryFactory.html" title="class in org.apache.xmlrpc.server">RequestProcessorFactoryFactory.RequestSpecificProcessorFactoryFactory</A></B></CODE>
- <BR>
- This is the default implementation of <A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.html" title="interface in org.apache.xmlrpc.server"><CODE>RequestProcessorFactoryFactory</CODE></A>.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static class</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.StatelessProcessorFactoryFactory.html" title="class in org.apache.xmlrpc.server">RequestProcessorFactoryFactory.StatelessProcessorFactoryFactory</A></B></CODE>
- <BR>
- This is an alternative implementation of <A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.html" title="interface in org.apache.xmlrpc.server"><CODE>RequestProcessorFactoryFactory</CODE></A>.</TD>
- </TR>
- </TABLE>
-
- <!-- ========== 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> <A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.RequestProcessorFactory.html" title="interface in org.apache.xmlrpc.server">RequestProcessorFactoryFactory.RequestProcessorFactory</A></CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.html#getRequestProcessorFactory(java.lang.Class)">getRequestProcessorFactory</A></B>(java.lang.Class pClass)</CODE>
- <BR>
- This method is invoked at startup.</TD>
- </TR>
- </TABLE>
-
- <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="getRequestProcessorFactory(java.lang.Class)"><!-- --></A><H3>
- getRequestProcessorFactory</H3>
- <PRE>
- <A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.RequestProcessorFactory.html" title="interface in org.apache.xmlrpc.server">RequestProcessorFactoryFactory.RequestProcessorFactory</A> <B>getRequestProcessorFactory</B>(java.lang.Class pClass)
- throws <A HREF="../../../../org/apache/xmlrpc/XmlRpcException.html" title="class in org.apache.xmlrpc">XmlRpcException</A></PRE>
- <DL>
- <DD>This method is invoked at startup. It creates a factory for instances of
- <code>pClass</code>.
- <P>
- <DD><DL>
- <DT><B>Throws:</B>
- <DD><CODE><A HREF="../../../../org/apache/xmlrpc/XmlRpcException.html" title="class in org.apache.xmlrpc">XmlRpcException</A></CODE></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> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
- <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/RequestProcessorFactoryFactory.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
- </TR>
- </TABLE>
- </TD>
- <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
- </EM>
- </TD>
- </TR>
- <TR>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../../org/apache/xmlrpc/server/ReflectiveXmlRpcHandler.html" title="class in org.apache.xmlrpc.server"><B>PREV CLASS</B></A>
- <A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.RequestProcessorFactory.html" title="interface in org.apache.xmlrpc.server"><B>NEXT CLASS</B></A></FONT></TD>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../../index.html?org/apache/xmlrpc/server/RequestProcessorFactoryFactory.html" target="_top"><B>FRAMES</B></A>
- <A HREF="RequestProcessorFactoryFactory.html" target="_top"><B>NO FRAMES</B></A>
- <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: <A HREF="#nested_class_summary">NESTED</A> | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
- </TR>
- </TABLE>
- <A NAME="skip-navbar_bottom"></A>
- <!-- ======== END OF BOTTOM NAVBAR ======= -->
- <HR>
- Copyright © 2001-2009 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
- </BODY>
- </HTML>