[ 
https://issues.apache.org/jira/browse/CXF-5439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13870694#comment-13870694
 ] 

Sergey Beryozkin commented on CXF-5439:
---------------------------------------

Hi Guys, I was a bit childish with one of my earlier comments.
The following code sits in my local snapshot for few weeks now, I'll paste it 
here:

{code:java}
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface Provider {
    enum Type { InInterceptor, OutInterceptor, InFaultInterceptor, 
OutFaultInterceptor }
    enum Scope { Server, Client, All }
    
    Type type();
    Scope scope() default Scope.All; 
}
{code}

I'm particularly keen of using Scope property - I can see users of trying 
various approaches to get the providers shared among many endpoints but such 
that they are not picked by either client or servers, Scope will let them all 
listed within a shared bus; the endpoint/client creation code will need  to be 
updated a bit to filter out the providers which are not intended for either the 
server or the client.

I'm not very keen on Type property, having individual annotations could've been 
cleaner but I guess it is a compromise too, the above offers a single 
annotation only which can be optionally used for the reasons outlined earlier

> Introduce annotations for marking CXF interceptors and features to enable the 
> auto-discovery
> --------------------------------------------------------------------------------------------
>
>                 Key: CXF-5439
>                 URL: https://issues.apache.org/jira/browse/CXF-5439
>             Project: CXF
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Sergey Beryozkin
>            Priority: Minor
>             Fix For: 3.0.0-milestone2
>
>




--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to