You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by jc...@apache.org on 2005/10/14 20:29:53 UTC
svn commit: r321168 - /jakarta/commons/sandbox/proxy/trunk/xdocs/index.xml
Author: jcarman
Date: Fri Oct 14 11:29:41 2005
New Revision: 321168
URL: http://svn.apache.org/viewcvs?rev=321168&view=rev
Log:
Improved documentation.
Modified:
jakarta/commons/sandbox/proxy/trunk/xdocs/index.xml
Modified: jakarta/commons/sandbox/proxy/trunk/xdocs/index.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/xdocs/index.xml?rev=321168&r1=321167&r2=321168&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/xdocs/index.xml (original)
+++ jakarta/commons/sandbox/proxy/trunk/xdocs/index.xml Fri Oct 14 11:29:41 2005
@@ -36,10 +36,10 @@
<li><b>Performance Monitoring</b> - the proxy can log each method invocation to a performance monitor
allowing system administrators to see what parts of the system are potentially bogged down.</li>
</ul>
- <em>Commons Proxy</em> supports dynamic proxy generation using proxy factories, object providers, and
+ <em>Commons Proxy</em> supports dynamic proxy generation using proxy factories, object providers, invocation handlers, and
method interceptors.
</p>
- <subsection name="Proxy Factories">
+ <section name="Proxy Factories">
<p>
<a href="apidocs/org/apache/commons/proxy/ProxyFactory.html">Proxy factories</a>
encapsulate all necessary proxying logic away from your code. Switching proxying
@@ -59,32 +59,72 @@
</ul>
</p>
- </subsection>
- <subsection name="Object Providers">
+ </section>
+ <section name="Object Providers">
<p>
<a href="apidocs/org/apache/commons/proxy/provider/package-summary.html">Object providers</a>
provide the
objects which will be the "target" of a proxy. There are two types of object providers:
+ <subsection name="Core Object Providers">
+ <p>
+ A core object provider provides a core implementation object. <em>Commons Proxy</em> supports
+ many different implementations including:
+ </p>
+ <table border="0">
+ <tr><td><b>Constant</b></td><td>Always returns a specific object</td></tr>
+ <tr><td><b>Bean</b></td><td>Merely instantiates an object of a specified class each time</td></tr>
+ <tr><td><b>Cloning</b></td><td>Reflectively calls the public clone() method on a Cloneable object</td></tr>
+ <tr><td><b>Hessian</b></td><td>Returns a <a href="http://www.caucho.com/hessian/index.xtp">Hessian</a>-based service object</td></tr>
+ <tr><td><b>Burlap</b></td><td>Returns a <a href="http://www.caucho.com/burlap/index.xtp">Burlap</a>-based service object</td></tr>
+ <tr><td><b>Apache XML-RPC</b></td><td>Returns an <a href="http://ws.apache.org/xmlrpc/">Apache XML-RPC</a>-based service object</td></tr>
+ <tr><td><b>JAX-RPC</b></td><td>Returns a <a href="http://java.sun.com/webservices/jaxrpc/index.jsp">JAX-RPC</a>-based service object</td></tr>
+ <tr><td><b>Session Bean</b></td><td>Returns a reference to a Session EJB (stateless session beans only)</td></tr>
+ </table>
+ </subsection>
+ <subsection name="Decorating Object Providers">
+ <p>
+ A decorating object provider decorates the object returned by another provider.
+ <em>Commons Proxy</em> provides a few implementations including:
+ </p>
+ <table border="0">
+ <tr><td><b>Singleton</b></td><td>Calls a nested provider at most once, returning that original value on all subsequent invocations</td></tr>
+ <tr><td><b>Cached</b></td><td>Returns an object from a cache (if available). If no object is available in the cache, the nested provider is called</td></tr>
+ <tr><td><b>Pooled</b></td><td>Returns an object from a pool, creating new objects using the nested provider</td></tr>
+ </table>
+
+ </subsection>
- <ul>
- <li><b>Core Object Providers</b> - a provider which provides the core implementation
- object.</li>
- <li><b>Decorating Object Providers</b> - a provider which decorates the object returned by
- another provider.</li>
- </ul>
</p>
- </subsection>
- <subsection name="Method Interceptors">
+ </section>
+ <section name="Invocation Handlers">
+ <p>
+ An <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/reflect/InvocationHandler.html">invocation handler</a> handles all
+ method invocations using a single method. <em>Commons Proxy</em> provides a couple invocation handler implementations:
+ <table border="0">
+ <tr><td><b>Null</b></td><td>A provider which always returns a specific object</td></tr>
+ <tr><td><b>Apache XML-RPC</b></td><td>Uses <a href="http://ws.apache.org/xmlrpc/">Apache XML-RPC</a> to fulfill the method invocation</td></tr>
+ <tr><td><b>Cloning</b></td><td>A provider which reflectively calls the public clone() method on a Cloneable object</td></tr>
+ </table>
+ </p>
+
+ </section>
+ <section name="Method Interceptors">
<p>
<cm>Commons Proxy</cm> uses the <a href="http://aopalliance.sourceforge.net">AOP Alliance</a> API
for method interceptor support. Method interceptors provide <em>rudimentary</em> aspect-oriented
programming support, allowing you to alter the results/effects of a method invocation without actually
- changing the implementation of the method itself. <em>Commons Proxy</em> provides a
- <a href="apidocs/org/apache/commons/proxy/interceptor/FilteredMethodInterceptor.html">filtered</a>
- method interceptor implementation allowing you to specify which methods are intercepted using a
- <a href="apidocs/org/apache/commons/proxy/interceptor/MethodFilter.html">method filter</a>.
+ changing the implementation of the method itself. <em>Commons Proxy</em> provides a few method interceptor
+ implementations including:
+ <table border="0">
+ <tr><td><b>Executor</b></td><td>Uses an
+ <a href="http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/Executor.html">Executor</a> to execute the method in possibly another thread (only void methods are supported).</td></tr>
+ <tr><td><b>Logging</b></td><td>Logs all method invocations using the
+ <a href="http://jakarta.apache.org/commons/logging/">Jakarta Commons Logging</a> API</td></tr>
+ <tr><td><b>Filtered</b></td><td>Optionally intercepts a method invocation based on a
+ <a href="apidocs/org/apache/commons/proxy/interceptor/MethodFilter.html">method filter</a></td></tr>
+ </table>
</p>
- </subsection>
+ </section>
</section>
<section name="Status">
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org