-
Feature Request
-
Resolution: Obsolete
-
Major
-
1.0
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:
@Target({ METHOD, TYPE }) @Retention(RetentionPolicy.RUNTIME) @ServiceHandlerBindingType public @interface EchoService {}
Invocation handler:
@ServiceHandler @EchoService public class EchoServiceHandler { @AroundInvoke public Object invoke(InvocationContext ctx) { return ctx.getMethod().getName().toString(); } }
Usage:
@EchoService public interface HelloWorld { String helloWorld(); }