|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.atmosphere.samples.pubsub.PubSub
public class PubSub
Simple PubSub resource that demonstrate many functionality supported by Atmosphere.
| Constructor Summary | |
|---|---|
PubSub()
|
|
| Method Summary | |
|---|---|
Broadcastable |
aggregate(String message)
Retain Broadcast events until we have enough data. |
Broadcastable |
buffer(String message)
Buffer the first broadcast events until the second one happens. |
Broadcastable |
delayPublish(String message)
Delay for 5 seconds the executionof Broadcaster.broadcast(java.lang.Object) operation |
Broadcastable |
delayPublishAndResume(String message)
|
Broadcastable |
delaySchedule(String message)
Wait 5 seconds and then execute periodic Broadcaster.broadcast(java.lang.Object)
operations. |
String |
manualDelayBroadcast(String message)
Use the Broadcaster.delayBroadcast(java.lang.Object) directly
instead of using the annotation. |
Broadcastable |
publish(String message)
Broadcast messahge to this server and also to other server using JGroups |
Broadcastable |
publishWithXML(String message)
Broadcast XML data using JAXB |
Broadcastable |
schedule(String message)
Execute periodic Broadcaster.broadcast(java.lang.Object) operation. |
Broadcastable |
scheduleAndResume(String message)
Execute periodic Broadcaster.broadcast(java.lang.Object) operation and
resume the suspended connection after the first broadcast operation. |
Broadcastable |
subscribe()
Suspend the response, and register a AtmosphereResourceEventListener
that get notified when events occurs like client disconnection, broadcast
or when the response get resumed. |
Broadcastable |
subscribeAndResume()
Suspend the response, and tell teh framework to resume the response when the first @Broadcast operation occurs. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PubSub()
| Method Detail |
|---|
@Suspend(listeners=org.atmosphere.commons.util.EventsLogger.class) public Broadcastable subscribe()
AtmosphereResourceEventListener
that get notified when events occurs like client disconnection, broadcast
or when the response get resumed.
Broadcastable used to broadcast events.@Suspend(resumeOnBroadcast=true) public Broadcastable subscribeAndResume()
Broadcastable used to broadcast events.public Broadcastable publishWithXML(String message)
message - A String from an HTML form
Broadcastable used to broadcast events.
@Cluster(name="chat",
value=org.atmosphere.plugin.cluster.jgroups.JGroupsFilter.class)
public Broadcastable publish(String message)
message - A String from an HTML form
Broadcastable used to broadcast events.public Broadcastable aggregate(String message)
StringFilterAggregator
to configure the amount of data buffered before the events gets written
back to the set of suspended response.
message - A String from an HTML form
Broadcastable used to broadcast events.public Broadcastable scheduleAndResume(String message)
Broadcaster.broadcast(java.lang.Object) operation and
resume the suspended connection after the first broadcast operation.
message - A String from an HTML form
Broadcastable used to broadcast events.public Broadcastable delaySchedule(String message)
Broadcaster.broadcast(java.lang.Object)
operations.
message - A String from an HTML form
Broadcastable used to broadcast events.public Broadcastable schedule(String message)
Broadcaster.broadcast(java.lang.Object) operation.
message - A String from an HTML form
Broadcastable used to broadcast events.public Broadcastable delayPublish(String message)
Broadcaster.broadcast(java.lang.Object) operation
message - A String from an HTML form
Broadcastable used to broadcast events.public Broadcastable delayPublishAndResume(String message)
public Broadcastable buffer(String message)
message - A String from an HTML form
Broadcastable used to broadcast events.public String manualDelayBroadcast(String message)
Broadcaster.delayBroadcast(java.lang.Object) directly
instead of using the annotation.
message - A String from an HTML form
Broadcastable used to broadcast events.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||