|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.cometd.java.annotation.ClientAnnotationProcessor
public class ClientAnnotationProcessor
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);
ServerAnnotationProcessor| Field Summary | |
|---|---|
protected org.eclipse.jetty.util.log.Logger |
logger
|
| Constructor Summary | |
|---|---|
ClientAnnotationProcessor(ClientSession clientSession)
|
|
| Method Summary | |
|---|---|
boolean |
deprocess(Object bean)
Performs the opposite processing done by process(Object) on callbacks methods
annotated with Listener and Subscription, and on lifecycle methods annotated
with PreDestroy. |
boolean |
deprocessCallbacks(Object bean)
Deconfigures callbacks annotated with Listener and Subscription. |
protected Method |
findGetterMethod(Class<?> klass,
Method setter)
|
protected Object |
getField(Object bean,
Field field)
|
protected Object |
invokeMethod(Object bean,
Method method,
Object... args)
|
boolean |
process(Object bean)
Processes dependencies annotated with Session, and callbacks
annotated with Listener and Subscription. |
boolean |
processPostConstruct(Object bean)
Processes lifecycle methods annotated with PostConstruct. |
boolean |
processPreDestroy(Object bean)
Processes lifecycle methods annotated with PreDestroy. |
protected void |
setField(Object bean,
Field field,
Object value)
|
protected static boolean |
signaturesMatch(Class<?>[] candidate,
Class<?>[] expected)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.eclipse.jetty.util.log.Logger logger
| Constructor Detail |
|---|
public ClientAnnotationProcessor(ClientSession clientSession)
| Method Detail |
|---|
public boolean process(Object bean)
Session, and callbacks
annotated with Listener and Subscription.
bean - the annotated service instance
public boolean processPostConstruct(Object bean)
PostConstruct.
bean - the annotated service instance
public boolean deprocess(Object bean)
process(Object) on callbacks methods
annotated with Listener and Subscription, and on lifecycle methods annotated
with PreDestroy.
bean - the annotated service instance
process(Object)public boolean deprocessCallbacks(Object bean)
Listener and Subscription.
bean - the annotated service instance
public boolean processPreDestroy(Object bean)
PreDestroy.
bean - the annotated service instance
protected Object invokeMethod(Object bean,
Method method,
Object... args)
protected Method findGetterMethod(Class<?> klass,
Method setter)
protected Object getField(Object bean,
Field field)
protected void setField(Object bean,
Field field,
Object value)
protected static boolean signaturesMatch(Class<?>[] candidate,
Class<?>[] expected)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||