|
||||||||||
| 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.AbstractBroadcasterProxy
public abstract class AbstractBroadcasterProxy
Abstract Broadcaster that delegates the internal processing to a proxy.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.atmosphere.cpr.DefaultBroadcaster |
|---|
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 |
|---|
asyncWriteFuture, asyncWriteQueue, bc, broadcasterCache, broadcastOnResume, CACHED, config, delayedBroadcast, destroyed, lifeCycleListeners, messages, name, notifierFuture, resources, scope, started, uri |
| Constructor Summary | |
|---|---|
AbstractBroadcasterProxy(String id,
URI uri,
AtmosphereServlet.AtmosphereConfig config)
|
|
| Method Summary | ||
|---|---|---|
protected void |
broadcast(AtmosphereResource<?,?> r,
AtmosphereResourceEvent e)
|
|
|
broadcast(T msg)
Broadcast the Object to all suspended response, e.g. |
|
|
broadcast(T msg,
AtmosphereResource<?,?> r)
Broadcast the Object to all suspended response, e.g. |
|
|
broadcast(T msg,
Set<AtmosphereResource<?,?>> subset)
Broadcast the Object to all suspended response, e.g. |
|
protected void |
broadcastReceivedMessage(Object message)
|
|
protected Runnable |
getBroadcastHandler()
|
|
abstract void |
incomingBroadcast()
Implement this method to broadcast message received from an external source like JGroups, Redis, etc. |
|
abstract void |
outgoingBroadcast(Object message)
Implement this method to broadcast message to external source like JGroups, Redis, etc. |
|
protected void |
reconfigure()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractBroadcasterProxy(String id,
URI uri,
AtmosphereServlet.AtmosphereConfig config)
| Method Detail |
|---|
public abstract void incomingBroadcast()
public abstract void outgoingBroadcast(Object message)
message - outgoing messageprotected Runnable getBroadcastHandler()
getBroadcastHandler in class DefaultBroadcasterprotected void reconfigure()
protected void broadcast(AtmosphereResource<?,?> r,
AtmosphereResourceEvent e)
broadcast in class DefaultBroadcasterprotected void broadcastReceivedMessage(Object message)
public <T> Future<T> broadcast(T 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 <T> Future<T> broadcast(T 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 <T> Future<T> broadcast(T 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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||