commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <joerg.schai...@gmx.de>
Subject Re: [proxy] InvocationRecorder?
Date Sat, 05 Apr 2008 20:28:54 GMT
Hi James,

James Carman wrote:

> What do you folks think about a new addition to Proxy which basically
> allows you to record invocations made on proxy objects, similar to how
> EasyMock does it.  Here's the idea...
> 
> public class InvocationRecorder
> {
>   public List<RecordedInvocation> getRecordedInvocations();
>   public <T> proxy(Class<T> type);
> }
> 
> public class RecordedInvocation
> {
>   public Method getInvokedMethod();
>   public Object[] getArguments();
> }
> 
> The Wicket folks are doing something similar to build up their
> bindings for form components
> (https://issues.apache.org/jira/browse/WICKET-1327):
> 
> SafePropertyModel<Person> p = new SafePropertyModel<Person>(new Person());
> TextField field = new TextField("name",
> p.bind(p.property().getFirstName()));
> 
> With this addition to Proxy, we can handle all the "recording" for
> them.  They just have to figure out what to do with the recorded
> invocations.

Pico folks do this for years in their web layer. More or less done in
ProxyToys technology. They use it also to assemble the components available
for each incoming request. However, the interesting part is the replay
action. That way the expensive part with all the reflection magic to search
the matching components is replaced the second time simply with the
recordings of the proxy.

- Jörg



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message