|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.atmosphere.cpr.BroadcasterConfig
public class BroadcasterConfig
Handle Broadcaster configuration like ExecutorService and
BroadcastFilter
| Nested Class Summary | |
|---|---|
static class |
BroadcasterConfig.DefaultBroadcasterCache
|
| Field Summary | |
|---|---|
protected ConcurrentLinkedQueue<BroadcastFilter> |
filters
|
| Constructor Summary | |
|---|---|
BroadcasterConfig()
|
|
BroadcasterConfig(ExecutorService executorService,
ScheduledExecutorService scheduler)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final ConcurrentLinkedQueue<BroadcastFilter> filters
| Constructor Detail |
|---|
public BroadcasterConfig()
public BroadcasterConfig(ExecutorService executorService,
ScheduledExecutorService scheduler)
| Method Detail |
|---|
protected void configExecutors()
public BroadcasterConfig setExecutorService(ExecutorService executorService)
ExecutorService which can be used to dispatch
AtmosphereResourceEvent. By default, an Executors.newFixedThreadPool(int)
is used if that method is not invoked.
executorService - to be used when broadcasting.public ExecutorService getExecutorService()
ExecutorService this Broadcaster support.
By default it returns and will use
the underlying number of core/processor as an indication of the thread number.
public boolean addFilter(BroadcastFilter e)
BroadcastFilter
e - BroadcastFilter
public void destroy()
public boolean removeFilter(BroadcastFilter e)
BroadcastFilter
e - BroadcastFilter
public void removeAllFilters()
BroadcastFilter
public boolean hasFilters()
BroadcastFilter
BroadcastFilterprotected BroadcastFilter.BroadcastAction filter(Object object)
BroadcastFilter in the other they were added.
object - the broadcasted object.
public ExecutorService getDefaultExecutorService()
ExecutorService.
public BroadcasterConfig setScheduledExecutorService(ScheduledExecutorService scheduler)
ExecutorService which can be used to dispatch
AtmosphereResourceEvent. By default, an ScheduledExecutorService
is used if that method is not invoked.
scheduler - to be used when broadcasting.
public ScheduledExecutorService getScheduledExecutorService()
ScheduledExecutorService this Broadcaster support.
By default it returns Executors.newScheduledThreadPool(int) and will use
the underlying number of core/processor as an indication of the thread number.
public BroadcasterConfig setBroadcasterCache(BroadcasterCache broadcasterCache)
BroadcasterConfig.DefaultBroadcasterCache
broadcasterCache - a BroadcasterConfig.DefaultBroadcasterCache
public BroadcasterCache getBroadcasterCache()
BroadcasterConfig.DefaultBroadcasterCache
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||