Asynchronous asyncAnnotation = ctx.getActionAnnotation(Asynchronous.class);
if (asyncAnnotation != null) {
doAsynchronous();
}
Suspend suspendAnnotation = ctx.getActionAnnotation(Suspend.class);
if (suspendAnnotation != null) {
long suspendTimeout = suspendAnnotation.period();
TimeUnit tu = suspendAnnotation.timeUnit();
suspendTimeout = translateTimeUnit(suspendTimeout, tu);
Suspend.SCOPE scope = suspendAnnotation.scope();
Class<? extends AtmosphereResourceEventListener>[] listeners =
suspendAnnotation.listeners();
String topic = null;
boolean writeEntity = true;
//TODO used eventually in executeSuspend()
String contentType = suspendAnnotation.contentType();
doSuspend(entity, req, resp, resource, config, topic, suspendTimeout, scope,
writeEntity, listeners, false, suspendAnnotation.resumeOnBroadcast(),
useResumeAnnotation);
}
Subscribe subscribeAnnotation = ctx.getActionAnnotation(Subscribe.class);
if (subscribeAnnotation != null) {