Class ClientAnnotationProcessor

java.lang.Object
org.cometd.annotation.ClientAnnotationProcessor

public class ClientAnnotationProcessor
extends Object

Processes annotations in client-side service objects.

Service objects must be annotated with Service at class level to be processed by this processor, for example:

 @Service
 public class MyService
 {
     @Listener(Channel.META_CONNECT)
     public void metaConnect(Message message)
     {
         // Do something
     }
 }
 

The processor is used in this way:

 ClientSession bayeux = ...;
 ClientAnnotationProcessor processor = ClientAnnotationProcessor.get(bayeux);
 MyService s = new MyService();
 processor.process(s);
 
See Also:
ServerAnnotationProcessor