- Author:
- Jeanfrancois Arcand
|
Method Summary |
MetaBroadcaster |
addBroadcasterListener(BroadcasterListener b)
Add a BroadcasterListener to all mapped Broadcasters. |
protected org.atmosphere.cpr.DefaultMetaBroadcaster.MetaBroadcasterFuture |
broadcast(String path,
Object message,
int time,
TimeUnit unit,
boolean delay,
boolean cacheMessage)
|
Future<List<Broadcaster>> |
broadcastTo(String broadcasterID,
Object message)
Broadcast the message to all Broadcasters whose Broadcaster.getID() matches the broadcasterID value. |
Future<List<Broadcaster>> |
broadcastTo(String broadcasterID,
Object message,
boolean cacheMessage)
Broadcast the message to all Broadcasters whose Broadcaster.getID() matches the broadcasterID value. |
MetaBroadcaster |
cache(MetaBroadcaster.MetaBroadcasterCache cache)
Set the MetaBroadcaster.MetaBroadcasterCache. |
void |
configure(AtmosphereConfig config)
Configure an AtmosphereFramework object. |
Future<List<Broadcaster>> |
delayTo(String broadcasterID,
Object message,
int time,
TimeUnit unit)
Delay the message delivery to Broadcasters whose Broadcaster.getID()
matches the broadcasterID value. |
void |
destroy()
|
protected MetaBroadcaster |
flushCache()
Flush the cached messages. |
protected org.atmosphere.cpr.DefaultMetaBroadcaster.MetaBroadcasterFuture |
map(String path,
Object message,
int time,
TimeUnit unit,
boolean delay,
boolean cacheMessage)
|
MetaBroadcaster |
removeBroadcasterListener(BroadcasterListener b)
Remove the BroadcasterListener. |
Future<List<Broadcaster>> |
scheduleTo(String broadcasterID,
Object message,
int time,
TimeUnit unit)
Broadcast the message at a fixed rate to all Broadcasters whose Broadcaster.getID()
matches the broadcasterID value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAPPING_REGEX
public static final String MAPPING_REGEX
- See Also:
- Constant Field Values
DefaultMetaBroadcaster
public DefaultMetaBroadcaster()
configure
public void configure(AtmosphereConfig config)
- Description copied from interface:
AtmosphereConfigAware
- Configure an AtmosphereFramework object.
- Specified by:
configure in interface AtmosphereConfigAware
- Parameters:
config - AtmosphereConfig
broadcast
protected org.atmosphere.cpr.DefaultMetaBroadcaster.MetaBroadcasterFuture broadcast(String path,
Object message,
int time,
TimeUnit unit,
boolean delay,
boolean cacheMessage)
map
protected org.atmosphere.cpr.DefaultMetaBroadcaster.MetaBroadcasterFuture map(String path,
Object message,
int time,
TimeUnit unit,
boolean delay,
boolean cacheMessage)
broadcastTo
public Future<List<Broadcaster>> broadcastTo(String broadcasterID,
Object message)
- Description copied from interface:
MetaBroadcaster
- Broadcast the message to all Broadcasters whose
Broadcaster.getID() matches the broadcasterID value.
- Specified by:
broadcastTo in interface MetaBroadcaster
- Parameters:
broadcasterID - a String (or path) that can potentially match a Broadcaster.getID()message - a message to be broadcasted
- Returns:
- a Future
broadcastTo
public Future<List<Broadcaster>> broadcastTo(String broadcasterID,
Object message,
boolean cacheMessage)
- Description copied from interface:
MetaBroadcaster
- Broadcast the message to all Broadcasters whose
Broadcaster.getID() matches the broadcasterID value.
- Specified by:
broadcastTo in interface MetaBroadcaster
- Parameters:
broadcasterID - a String (or path) that can potentially match a Broadcaster.getID()message - a message to be broadcastedcacheMessage - allow the cache to be cached or not.
- Returns:
- a Future
flushCache
protected MetaBroadcaster flushCache()
- Flush the cached messages.
- Returns:
- this
scheduleTo
public Future<List<Broadcaster>> scheduleTo(String broadcasterID,
Object message,
int time,
TimeUnit unit)
- Description copied from interface:
MetaBroadcaster
- Broadcast the message at a fixed rate to all Broadcasters whose
Broadcaster.getID()
matches the broadcasterID value. This operation will invoke Broadcaster.scheduleFixedBroadcast(Object, long, java.util.concurrent.TimeUnit)}
- Specified by:
scheduleTo in interface MetaBroadcaster
- Parameters:
broadcasterID - a String (or path) that can potentially match a Broadcaster.getID()message - a message to be broadcastedtime - a time valueunit - a TimeUnit
- Returns:
- a Future
delayTo
public Future<List<Broadcaster>> delayTo(String broadcasterID,
Object message,
int time,
TimeUnit unit)
- Description copied from interface:
MetaBroadcaster
- Delay the message delivery to Broadcasters whose
Broadcaster.getID()
matches the broadcasterID value. This operation will invoke Broadcaster.delayBroadcast(Object, long, java.util.concurrent.TimeUnit) (Object, long, java.util.concurrent.TimeUnit)}}
- Specified by:
delayTo in interface MetaBroadcaster
- Parameters:
broadcasterID - a String (or path) that can potentially match a Broadcaster.getID()message - a message to be broadcastedtime - a time valueunit - a TimeUnit
- Returns:
- a Future
addBroadcasterListener
public MetaBroadcaster addBroadcasterListener(BroadcasterListener b)
- Description copied from interface:
MetaBroadcaster
- Add a
BroadcasterListener to all mapped Broadcasters.
- Specified by:
addBroadcasterListener in interface MetaBroadcaster
- Parameters:
b - BroadcasterListener
- Returns:
- this
removeBroadcasterListener
public MetaBroadcaster removeBroadcasterListener(BroadcasterListener b)
- Description copied from interface:
MetaBroadcaster
- Remove the
BroadcasterListener.
- Specified by:
removeBroadcasterListener in interface MetaBroadcaster
- Parameters:
b - BroadcasterListener
- Returns:
- this
cache
public MetaBroadcaster cache(MetaBroadcaster.MetaBroadcasterCache cache)
- Description copied from interface:
MetaBroadcaster
- Set the
MetaBroadcaster.MetaBroadcasterCache. Default is MetaBroadcaster.NoCache.
- Specified by:
cache in interface MetaBroadcaster
- Returns:
- this
destroy
public void destroy()
- Specified by:
destroy in interface MetaBroadcaster
Copyright © 2015. All Rights Reserved.