org.atmosphere.pool
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 Summary
 long activeBroadcaster()
          Current number of active Broadcaster borrowed from the pool
 T borrowBroadcaster(Object id)
          Return a Broadcaster
 U implementation()
          Return the current native pool implementation.
 long poolSize()
          The current Pool Size
<T extends Broadcaster,U>
PoolableProvider
returnBroadcaster(T b)
          Return a destroyed Broadcaster instance.
 
Methods inherited from interface org.atmosphere.inject.AtmosphereConfigAware
configure
 

Method Detail

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


Copyright © 2015. All Rights Reserved.