commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman (JIRA)" <j...@apache.org>
Subject [jira] Created: (PROXY-14) Strategy-Based ObjectProvider
Date Wed, 05 Nov 2008 10:57:44 GMT
Strategy-Based ObjectProvider
-----------------------------

                 Key: PROXY-14
                 URL: https://issues.apache.org/jira/browse/PROXY-14
             Project: Commons Proxy
          Issue Type: New Feature
    Affects Versions: 1.0
            Reporter: James Carman
            Assignee: James Carman


Implement a strategy-based ObjectProvider.  Basically, the provider would choose different
strategy objects (that implement the service interface) based on information obtained at runtime
during the method invocation.  One example would be a strategy-based provider which chose
its strategy object based on the type of object passed in as one of the method parameters
(similar to HiveMind's strategy support).  For example, suppose I have a service interface
like:

{code}
public interface Renderer {
  public void render(Shape shape);
}
{code}

and I want to provide different implementations for Circle, Rectangle, Triangle, etc., then
I would provide a mapping from those types to implementation objects that also implement Renderer.
 Proxy would create a dynamic proxy that would choose which implementation object to use at
runtime based on the type of shape passed in to the render method.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message