org.atmosphere.annotation
Annotation Type Subscribe


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

Subscribe to the "value", or topic. This annotation will create a Broadcaster with the value as ID, and suspend the underlying connection. This annotation does the same as Suspend, but create the Broadcaster automatically from the value.

That annotation doesn't allow configuring the Suspend.outputComments() value. The default value is set to false. If you want to support http-streaming, make sure your client set the X-Atmosphere-Transport header to "streaming".

Author:
Jeanfrancois Arcand

Required Element Summary
 String value
          The value that will be used to create or lookup a Broadcaster
 
Optional Element Summary
 Class<? extends AtmosphereResourceEventListener>[] listeners
          Add AtmosphereResourceEventListener to the broadcast operation.
 

Element Detail

value

public abstract String value
The value that will be used to create or lookup a Broadcaster

Returns:
The value that will be used to create or lookup a Broadcaster

listeners

public abstract Class<? extends AtmosphereResourceEventListener>[] listeners
Add AtmosphereResourceEventListener to the broadcast operation.

Default:
{}


Copyright © 2011. All Rights Reserved.