org.atmosphere.annotation
Annotation Type Suspend


@Target(value=METHOD)
@Retention(value=RUNTIME)
@Documented
public @interface Suspend

Suspend the underlying response. Once suspended, a response migth be allowed to consume Broadcast events, depending on the scope ([@link Suspend#SCOPE}). By default, a suspended response is suspended able to consume any broadcasted events executed inside the same application (SCOPE.APPLICATION). The period can also be per suspended response (SCOPE.REQUEST) or available to other application (SCOPE.VM).

Author:
Jeanfrancois Arcand

Optional Element Summary
 int period
          How long a response stay suspended, default is -1
 Suspend.SCOPE scope
          The Scope of the Broadcaster that will be created once the response gets suspended.
 

period

public abstract int period
How long a response stay suspended, default is -1

Returns:
Default:
-1

scope

public abstract Suspend.SCOPE scope
The Scope of the Broadcaster that will be created once the response gets suspended. One final word on Broadcaster: by default, a Broadcaster will broadcast using all resources/classes on which the response has been suspended. This behavior is configurable and you can configure it setting the appropriate scope

Returns:
The Scope of the Broadcaster that will be created once the response gets suspended.
Default:
org.atmosphere.annotation.Suspend.SCOPE.APPLICATION


Copyright © 2009 SUN Microsystems. All Rights Reserved.