Class PoolableBroadcasterFactory

java.lang.Object
org.atmosphere.cpr.DefaultBroadcasterFactory
org.atmosphere.pool.PoolableBroadcasterFactory
All Implemented Interfaces:
BroadcasterFactory

public class PoolableBroadcasterFactory extends DefaultBroadcasterFactory
This class uses a PoolableProvider to retrieve instance of Broadcaster. This class doesn't validate the id of the Broadcaster [Broadcaster.setID(String)] and can return a Broadcaster with was already created under that name. Set trackPooledBroadcaster(boolean) or ApplicationConfig.SUPPORT_TRACKED_BROADCASTER to true to track duplication but be aware it can significantly reduce performance. Use the DefaultBroadcasterFactory is recommended under that scenario.

By default, this factory doesn't keep trace of created Broadcasters hence a new pooled Broadcaster will always be returned unless trackPooledBroadcaster(boolean) or ApplicationConfig.SUPPORT_TRACKED_BROADCASTER is set to true.

This Factory has been designed for application.

This factory is usefull when an application needs a short-lived Broadcaster.
Author:
Jeanfrancois Arcand