Interface PoolableProvider<T extends Broadcaster,U>

All Superinterfaces:
AtmosphereConfigAware
All Known Implementing Classes:
BoundedApachePoolableProvider, UnboundedApachePoolableProvider

public interface PoolableProvider<T extends Broadcaster,U> extends AtmosphereConfigAware
Implements this interface for provisioning the PoolableBroadcasterFactory with Broadcaster
Author:
Jeanfrancois Arcand
  • Method Details

    • borrowBroadcaster

      T borrowBroadcaster(Object id)
      Return a Broadcaster
      Parameters:
      id - the name of the Broadcaster
      Returns:
      Broadcaster
    • returnBroadcaster

      <T extends Broadcaster, U> PoolableProvider returnBroadcaster(T b)
      Return a destroyed Broadcaster instance.
      Parameters:
      b - Broadcaster
      Returns:
      this
    • poolSize

      long poolSize()
      The current Pool Size
      Returns:
      current Pool size
    • activeBroadcaster

      long activeBroadcaster()
      Current number of active Broadcaster borrowed from the pool
    • implementation

      U implementation()
      Return the current native pool implementation. For example, the GenericObjectPool from Apache Common will be returned if the UnboundedApachePoolableProvider is used.
      Returns:
      the current native pool implementation