public abstract class AbstractBroadcasterProxy extends DefaultBroadcaster
Broadcaster that delegates the internal processing to a proxy.DefaultBroadcaster.AsyncWriteToken, DefaultBroadcaster.EntryBroadcaster.POLICY, Broadcaster.SCOPEASYNC_TOKEN, asyncWriteFuture, bc, broadcasterListeners, broadcastOnResume, CACHED, cacheStrategy, config, delayedBroadcast, destroyed, dispatchThread, lifeCycleListeners, messages, name, noOpsResource, notifierFuture, outOfOrderBroadcastSupported, resources, scope, started, uniqueWriteQueue, uri, waitTime, writeQueues, writeTimeoutInSecond| Constructor and Description |
|---|
AbstractBroadcasterProxy(java.lang.String id,
java.net.URI uri,
AtmosphereConfig config) |
| Modifier and Type | Method and Description |
|---|---|
<T> java.util.concurrent.Future<T> |
broadcast(T msg)
Broadcast the
Object to all suspended response, e.g. |
<T> java.util.concurrent.Future<T> |
broadcast(T msg,
AtmosphereResource r)
Broadcast the
Object to all suspended response, e.g. |
<T> java.util.concurrent.Future<T> |
broadcast(T msg,
java.util.Set<AtmosphereResource> subset)
Broadcast the
Object to all suspended response, e.g. |
protected void |
broadcastReceivedMessage(java.lang.Object message) |
protected java.lang.Runnable |
getBroadcastHandler() |
abstract void |
incomingBroadcast()
Implement this method to broadcast message received from an external source like JGroups, Redis, etc.
|
protected void |
invokeOnStateChange(AtmosphereResource r,
AtmosphereResourceEvent e) |
abstract void |
outgoingBroadcast(java.lang.Object message)
Implement this method to broadcast message to external source like JGroups, Redis, etc.
|
protected void |
reconfigure() |
addAtmosphereResource, addBroadcasterLifeCyclePolicyListener, addBroadcasterListener, afterFilterCacheEntry, awaitAndBroadcast, broadcastOnResume, broadcastOnResume, cacheAndSuspend, cacheLostMessage, cacheLostMessage, cacheLostMessage, cacheLostMessage, checkCachedAndPush, createBroadcasterConfig, delayBroadcast, delayBroadcast, deliverPush, destroy, dispatchMessages, entryDone, executeAsyncWrite, filter, finalize, futureDone, getAsyncWriteHandler, getAtmosphereResources, getBroadcasterConfig, getID, getScope, invokeFiltersAndCache, isDestroyed, killReactiveThreads, onException, onException, perRequestFilter, prepareInvokeOnStateChange, push, queueWriteIO, reactiveThreadsCount, releaseExternalResources, removeAtmosphereResource, removeAtmosphereResource, removeBroadcasterLifeCyclePolicyListener, removeBroadcasterListener, resumeAll, retrieveTrackedBroadcast, scheduleFixedBroadcast, scheduleFixedBroadcast, setBroadcasterCacheStrategy, setBroadcasterConfig, setBroadcasterLifeCyclePolicy, setID, setScope, setSuspendPolicy, spawnReactor, start, toString, trackBroadcastMessagepublic AbstractBroadcasterProxy(java.lang.String id,
java.net.URI uri,
AtmosphereConfig config)
public abstract void incomingBroadcast()
public abstract void outgoingBroadcast(java.lang.Object message)
message - outgoing messageprotected java.lang.Runnable getBroadcastHandler()
getBroadcastHandler in class DefaultBroadcasterprotected void reconfigure()
protected void invokeOnStateChange(AtmosphereResource r, AtmosphereResourceEvent e)
invokeOnStateChange in class DefaultBroadcasterprotected void broadcastReceivedMessage(java.lang.Object message)
public <T> java.util.concurrent.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> java.util.concurrent.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 AtmosphereResourceFuture that can be used to synchronize using the Future.get()public <T> java.util.concurrent.Future<T> broadcast(T msg,
java.util.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 AtmosphereResourceFuture that can be used to synchronize using the Future.get()Copyright © 2018. All Rights Reserved.