PageRenderTime 387ms CodeModel.GetById 201ms app.highlight 18ms RepoModel.GetById 163ms app.codeStats 0ms

/lib/docs/org/apache/xmlrpc/server/RequestProcessorFactoryFactory.html

http://mp-rechnungs-und-kundenverwaltung.googlecode.com/
HTML | 289 lines | 238 code | 30 blank | 21 comment | 0 complexity | 9a4de138c70f881216ff68e5e9d578aa MD5 | raw file
  1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2<!--NewPage-->
  3<HTML>
  4<HEAD>
  5<!-- Generated by javadoc (build 1.6.0_0) on Mon Apr 20 21:46:00 CEST 2009 -->
  6<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  7<TITLE>
  8RequestProcessorFactoryFactory (Apache XML-RPC 3.1.2 API)
  9</TITLE>
 10
 11<META NAME="date" CONTENT="2009-04-20">
 12
 13<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
 14
 15<SCRIPT type="text/javascript">
 16function windowTitle()
 17{
 18    if (location.href.indexOf('is-external=true') == -1) {
 19        parent.document.title="RequestProcessorFactoryFactory (Apache XML-RPC 3.1.2 API)";
 20    }
 21}
 22</SCRIPT>
 23<NOSCRIPT>
 24</NOSCRIPT>
 25
 26</HEAD>
 27
 28<BODY BGCOLOR="white" onload="windowTitle();">
 29<HR>
 30
 31
 32<!-- ========= START OF TOP NAVBAR ======= -->
 33<A NAME="navbar_top"><!-- --></A>
 34<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
 35<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
 36<TR>
 37<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
 38<A NAME="navbar_top_firstrow"><!-- --></A>
 39<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
 40  <TR ALIGN="center" VALIGN="top">
 41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
 42  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
 43  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
 44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/RequestProcessorFactoryFactory.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
 45  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
 46  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
 47  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
 48  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
 49  </TR>
 50</TABLE>
 51</TD>
 52<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
 53</EM>
 54</TD>
 55</TR>
 56
 57<TR>
 58<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 59&nbsp;<A HREF="../../../../org/apache/xmlrpc/server/ReflectiveXmlRpcHandler.html" title="class in org.apache.xmlrpc.server"><B>PREV CLASS</B></A>&nbsp;
 60&nbsp;<A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.RequestProcessorFactory.html" title="interface in org.apache.xmlrpc.server"><B>NEXT CLASS</B></A></FONT></TD>
 61<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 62  <A HREF="../../../../index.html?org/apache/xmlrpc/server/RequestProcessorFactoryFactory.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 63&nbsp;<A HREF="RequestProcessorFactoryFactory.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
 64&nbsp;<SCRIPT type="text/javascript">
 65  <!--
 66  if(window==top) {
 67    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
 68  }
 69  //-->
 70</SCRIPT>
 71<NOSCRIPT>
 72  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
 73</NOSCRIPT>
 74
 75
 76</FONT></TD>
 77</TR>
 78<TR>
 79<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 80  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
 81<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 82DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
 83</TR>
 84</TABLE>
 85<A NAME="skip-navbar_top"></A>
 86<!-- ========= END OF TOP NAVBAR ========= -->
 87
 88<HR>
 89<!-- ======== START OF CLASS DATA ======== -->
 90<H2>
 91<FONT SIZE="-1">
 92org.apache.xmlrpc.server</FONT>
 93<BR>
 94Interface RequestProcessorFactoryFactory</H2>
 95<DL>
 96<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>
 97</DL>
 98<HR>
 99<DL>
100<DT><PRE>public interface <B>RequestProcessorFactoryFactory</B></DL>
101</PRE>
102
103<P>
104<p>The request processor is the object, which is actually performing
105 the request. There is nothing magic about the request processor:
106 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>
107 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.
108 The mapping uses this factory to create instances of
109 <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
110 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
111 factory to create the actual request processor when a request comes
112 in.</p>
113 <p>However, the question arises, when and how the request processor
114 is created and whether it needs request specific initialization.
115 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
116 that logic pluggable. Unfortunately, we aren't done with a single
117 factory: We even need a factory for factories. The rationale is
118 best explained by looking at the different use cases and how to
119 implement them.</p>
120 <p>The default <A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.html" title="interface in org.apache.xmlrpc.server"><CODE>RequestProcessorFactoryFactory</CODE></A> is the
121 <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
122 processor instance for any request. In other words, it allows the
123 request processor to have some state. This is fine, if the request
124 processor is a lightweight object or needs request specific
125 initialization. In this case, the actual request processor is
126 created and invoked when
127 calling <A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.RequestProcessorFactory.html#getRequestProcessor(org.apache.xmlrpc.XmlRpcRequest)"><CODE>RequestProcessorFactoryFactory.RequestProcessorFactory.getRequestProcessor(XmlRpcRequest)</CODE></A>.</p>
128 <p>An alternative implementation is the
129 <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
130 create stateless request processors. Stateless request processors
131 are typically heavyweight objects, which have an expensive
132 initialization phase. The processor factory, which is created by
133 <A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.html#getRequestProcessorFactory(java.lang.Class)"><CODE>getRequestProcessorFactory(Class pClass)</CODE></A> contains an
134 initialized singleton, which is returned by
135 <A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.RequestProcessorFactory.html#getRequestProcessor(org.apache.xmlrpc.XmlRpcRequest)"><CODE>RequestProcessorFactoryFactory.RequestProcessorFactory.getRequestProcessor(XmlRpcRequest)</CODE></A>.</p>
136 <p>Other alternatives might be a
137 <A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.html" title="interface in org.apache.xmlrpc.server"><CODE>RequestProcessorFactoryFactory</CODE></A>, which maintains a pool
138 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
139 configured by calling
140 <A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.RequestProcessorFactory.html#getRequestProcessor(org.apache.xmlrpc.XmlRpcRequest)"><CODE>RequestProcessorFactoryFactory.RequestProcessorFactory.getRequestProcessor(XmlRpcRequest)</CODE></A>.</p>
141<P>
142
143<P>
144<HR>
145
146<P>
147<!-- ======== NESTED CLASS SUMMARY ======== -->
148
149<A NAME="nested_class_summary"><!-- --></A>
150<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
151<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
152<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
153<B>Nested Class Summary</B></FONT></TH>
154</TR>
155<TR BGCOLOR="white" CLASS="TableRowColor">
156<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
157<CODE>static&nbsp;interface</CODE></FONT></TD>
158<TD><CODE><B><A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.RequestProcessorFactory.html" title="interface in org.apache.xmlrpc.server">RequestProcessorFactoryFactory.RequestProcessorFactory</A></B></CODE>
159
160<BR>
161&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is the factory for request processors.</TD>
162</TR>
163<TR BGCOLOR="white" CLASS="TableRowColor">
164<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
165<CODE>static&nbsp;class</CODE></FONT></TD>
166<TD><CODE><B><A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.RequestSpecificProcessorFactoryFactory.html" title="class in org.apache.xmlrpc.server">RequestProcessorFactoryFactory.RequestSpecificProcessorFactoryFactory</A></B></CODE>
167
168<BR>
169&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>
170</TR>
171<TR BGCOLOR="white" CLASS="TableRowColor">
172<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
173<CODE>static&nbsp;class</CODE></FONT></TD>
174<TD><CODE><B><A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.StatelessProcessorFactoryFactory.html" title="class in org.apache.xmlrpc.server">RequestProcessorFactoryFactory.StatelessProcessorFactoryFactory</A></B></CODE>
175
176<BR>
177&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>
178</TR>
179</TABLE>
180&nbsp;
181<!-- ========== METHOD SUMMARY =========== -->
182
183<A NAME="method_summary"><!-- --></A>
184<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
185<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
186<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
187<B>Method Summary</B></FONT></TH>
188</TR>
189<TR BGCOLOR="white" CLASS="TableRowColor">
190<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
191<CODE>&nbsp;<A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.RequestProcessorFactory.html" title="interface in org.apache.xmlrpc.server">RequestProcessorFactoryFactory.RequestProcessorFactory</A></CODE></FONT></TD>
192<TD><CODE><B><A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.html#getRequestProcessorFactory(java.lang.Class)">getRequestProcessorFactory</A></B>(java.lang.Class&nbsp;pClass)</CODE>
193
194<BR>
195&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method is invoked at startup.</TD>
196</TR>
197</TABLE>
198&nbsp;
199<P>
200
201<!-- ============ METHOD DETAIL ========== -->
202
203<A NAME="method_detail"><!-- --></A>
204<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
205<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
206<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
207<B>Method Detail</B></FONT></TH>
208</TR>
209</TABLE>
210
211<A NAME="getRequestProcessorFactory(java.lang.Class)"><!-- --></A><H3>
212getRequestProcessorFactory</H3>
213<PRE>
214<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&nbsp;pClass)
215                                                                                  throws <A HREF="../../../../org/apache/xmlrpc/XmlRpcException.html" title="class in org.apache.xmlrpc">XmlRpcException</A></PRE>
216<DL>
217<DD>This method is invoked at startup. It creates a factory for instances of
218 <code>pClass</code>.
219<P>
220<DD><DL>
221
222<DT><B>Throws:</B>
223<DD><CODE><A HREF="../../../../org/apache/xmlrpc/XmlRpcException.html" title="class in org.apache.xmlrpc">XmlRpcException</A></CODE></DL>
224</DD>
225</DL>
226<!-- ========= END OF CLASS DATA ========= -->
227<HR>
228
229
230<!-- ======= START OF BOTTOM NAVBAR ====== -->
231<A NAME="navbar_bottom"><!-- --></A>
232<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
233<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
234<TR>
235<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
236<A NAME="navbar_bottom_firstrow"><!-- --></A>
237<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
238  <TR ALIGN="center" VALIGN="top">
239  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
240  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
241  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
242  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/RequestProcessorFactoryFactory.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
243  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
244  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
245  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
246  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
247  </TR>
248</TABLE>
249</TD>
250<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
251</EM>
252</TD>
253</TR>
254
255<TR>
256<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
257&nbsp;<A HREF="../../../../org/apache/xmlrpc/server/ReflectiveXmlRpcHandler.html" title="class in org.apache.xmlrpc.server"><B>PREV CLASS</B></A>&nbsp;
258&nbsp;<A HREF="../../../../org/apache/xmlrpc/server/RequestProcessorFactoryFactory.RequestProcessorFactory.html" title="interface in org.apache.xmlrpc.server"><B>NEXT CLASS</B></A></FONT></TD>
259<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
260  <A HREF="../../../../index.html?org/apache/xmlrpc/server/RequestProcessorFactoryFactory.html" target="_top"><B>FRAMES</B></A>  &nbsp;
261&nbsp;<A HREF="RequestProcessorFactoryFactory.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
262&nbsp;<SCRIPT type="text/javascript">
263  <!--
264  if(window==top) {
265    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
266  }
267  //-->
268</SCRIPT>
269<NOSCRIPT>
270  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
271</NOSCRIPT>
272
273
274</FONT></TD>
275</TR>
276<TR>
277<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
278  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
279<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
280DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
281</TR>
282</TABLE>
283<A NAME="skip-navbar_bottom"></A>
284<!-- ======== END OF BOTTOM NAVBAR ======= -->
285
286<HR>
287Copyright &#169; 2001-2009 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
288</BODY>
289</HTML>