[cdi-dev] [JBoss JIRA] Assigned: (CDI-110) Provide support for binding an invocation handler to an interface or abstract class
Pete Muir
pmuir at redhat.com
Wed Apr 27 14:20:56 EDT 2011
Rick, could you add this requirement to the issue so that we don't loose it.
On 27 Apr 2011, at 19:18, Rick Hightower wrote:
> This is so perfect. So this allow implementing proxies and mixins. You can specify an interface and then implement it else where (i.e., as a interceptor).
>
> I think this is a huge feature for writing extensions.
>
> With this feature, it should also be able to add mixins to any class. I.e., all of your domain classes implement create, read, update methods via mixins.
>
> Make sure we don't exclude the mixin case.
>
> On Wed, Apr 27, 2011 at 10:03 AM, Pete Muir (JIRA) <jira-events at lists.jboss.org> wrote:
>
> [ https://issues.jboss.org/browse/CDI-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> Pete Muir reassigned CDI-110:
> -----------------------------
>
> Assignee: George Gastaldi
>
>
> > Provide support for binding an invocation handler to an interface or abstract class
> > -----------------------------------------------------------------------------------
> >
> > Key: CDI-110
> > URL: https://issues.jboss.org/browse/CDI-110
> > Project: CDI Specification Issues
> > Issue Type: Feature Request
> > Components: Inheritance and Specialization
> > Affects Versions: 1.0
> > Reporter: George Gastaldi
> > Assignee: George Gastaldi
> > Labels: cdi
> > Fix For: 1.1 (Proposed)
> >
> >
> > The purpose of this feature is to allow interfaces and abstract classes to be automatically implemented by an invocation handler to which all abstract method invocations are delegated. The invocation handler would get "bound" to the type using the same strategy as is used for interceptor binding.
> > Binding type:
> > {code:java}
> > @Target({ METHOD, TYPE })
> > @Retention(RetentionPolicy.RUNTIME)
> > @ServiceHandlerBindingType
> > public @interface EchoService {}
> > {code}
> > Invocation handler:
> > {code:java}
> > @ServiceHandlerBindingType
> > @EchoService
> > public class EchoServiceHandler {
> > @AroundInvoke
> > public Object invoke(InvocationContext ctx) {
> > return ctx.getMethod().getName().toString();
> > }
> > }
> > {code}
> > Usage:
> > {code:java}
> > @EchoService
> > public interface HelloWorld {
> > String helloWorld();
> > }
> > {code}
>
> --
> This message is automatically generated by JIRA.
> For more information on JIRA, see: http://www.atlassian.com/software/jira
> _______________________________________________
> cdi-dev mailing list
> cdi-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/cdi-dev
>
>
>
> --
> Rick Hightower
> (415) 968-9037
> Profile
>
> _______________________________________________
> cdi-dev mailing list
> cdi-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/cdi-dev
More information about the cdi-dev
mailing list