Package org.atmosphere.annotation

Examples of org.atmosphere.annotation.Suspend


        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) {
View Full Code Here

TOP

Related Classes of org.atmosphere.annotation.Suspend

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.