|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.atmosphere.cpr.DefaultBroadcaster
org.atmosphere.util.SimpleBroadcaster
public class SimpleBroadcaster
Simple Broadcaster implementation that use the calling thread when broadcasting events.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.atmosphere.cpr.DefaultBroadcaster |
|---|
DefaultBroadcaster.AsyncWriteToken, DefaultBroadcaster.Entry |
| Nested classes/interfaces inherited from interface org.atmosphere.cpr.Broadcaster |
|---|
Broadcaster.POLICY, Broadcaster.SCOPE |
| Field Summary |
|---|
| Fields inherited from class org.atmosphere.cpr.DefaultBroadcaster |
|---|
ASYNC_TOKEN, asyncWriteFuture, bc, broadcasterListeners, broadcastOnResume, CACHED, config, delayedBroadcast, destroyed, dispatchThread, lifeCycleListeners, messages, name, noOpsResource, notifierFuture, resources, scope, started, uniqueWriteQueue, uri, waitTime, writeQueues, writeTimeoutInSecond |
| Constructor Summary | |
|---|---|
SimpleBroadcaster(String id,
AtmosphereConfig config)
|
|
| Method Summary | |
|---|---|
Future<Object> |
broadcast(Object msg)
Broadcast the Object to all suspended response, e.g. |
Future<Object> |
broadcast(Object msg,
AtmosphereResource r)
Broadcast the Object to all suspended response, e.g. |
Future<Object> |
broadcast(Object msg,
Set<AtmosphereResource> subset)
Broadcast the Object to all suspended response, e.g. |
protected BroadcasterConfig |
createBroadcasterConfig(AtmosphereConfig config)
Create BroadcasterConfig |
protected void |
prepareInvokeOnStateChange(AtmosphereResource r,
AtmosphereResourceEvent e)
|
protected void |
queueWriteIO(AtmosphereResource r,
DefaultBroadcaster.Entry entry)
|
void |
setBroadcasterConfig(BroadcasterConfig bc)
Set the BroadcasterConfig instance. |
protected void |
start()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleBroadcaster(String id,
AtmosphereConfig config)
| Method Detail |
|---|
protected BroadcasterConfig createBroadcasterConfig(AtmosphereConfig config)
BroadcasterConfig
createBroadcasterConfig in class DefaultBroadcasterconfig - the AtmosphereConfig
BroadcasterConfigprotected void start()
start in class DefaultBroadcasterpublic void setBroadcasterConfig(BroadcasterConfig bc)
BroadcasterConfig instance.
setBroadcasterConfig in interface BroadcastersetBroadcasterConfig in class DefaultBroadcasterbc - Configuration to be set.public Future<Object> broadcast(Object msg)
Object to all suspended response, e.g. invoke
AtmosphereHandler.onStateChange(org.atmosphere.cpr.AtmosphereResourceEvent).
broadcast in interface Broadcasterbroadcast in class DefaultBroadcastermsg - and Object to be broadcasted.
Future that can be used to synchronize using the Future.get()
public Future<Object> broadcast(Object msg,
AtmosphereResource r)
Object to all suspended response, e.g. invoke
AtmosphereHandler.onStateChange(org.atmosphere.cpr.AtmosphereResourceEvent) with an instance of AtmosphereResource, representing
a single suspended response..
broadcast in interface Broadcasterbroadcast in class DefaultBroadcastermsg - and Object to be broadcasted.r - an AtmosphereResource
Future that can be used to synchronize using the Future.get()
public Future<Object> broadcast(Object msg,
Set<AtmosphereResource> subset)
Object to all suspended response, e.g. invoke
AtmosphereHandler.onStateChange(org.atmosphere.cpr.AtmosphereResourceEvent) with a Set of AtmosphereResource,
representing a set of AtmosphereHandler.
broadcast in interface Broadcasterbroadcast in class DefaultBroadcastermsg - and Object to be broadcasted.subset - a Set of AtmosphereResource
Future that can be used to synchronize using the Future.get()
protected void prepareInvokeOnStateChange(AtmosphereResource r,
AtmosphereResourceEvent e)
prepareInvokeOnStateChange in class DefaultBroadcaster
protected void queueWriteIO(AtmosphereResource r,
DefaultBroadcaster.Entry entry)
throws InterruptedException
queueWriteIO in class DefaultBroadcasterInterruptedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||