org.red5.server.stream
Class DummyBWControlService

java.lang.Object
  extended by org.red5.server.stream.DummyBWControlService
All Implemented Interfaces:
IBWControlService

public class DummyBWControlService
extends Object
implements IBWControlService

A dummy bandwidth control service (bandwidth controller) that always has token available.

Author:
The Red5 Project (red5@osflash.org), Steven Gong (steven.gong@gmail.com)

Field Summary
 
Fields inherited from interface org.red5.server.stream.IBWControlService
KEY
 
Constructor Summary
DummyBWControlService()
           
 
Method Summary
 ITokenBucket getAudioBucket(IBWControlContext context)
          Return the token bucket for audio channel.
 ITokenBucket getDataBucket(IBWControlContext context)
          Return the token bucket for data channel.
 ITokenBucket getVideoBucket(IBWControlContext context)
          Return the token bucket for video channel.
 IBWControlContext lookupContext(IBWControllable bc)
          Lookup the registry context according to the controllable.
 IBWControlContext registerBWControllable(IBWControllable bc)
          Register a bandwidth controllable.
 void resetBuckets(IBWControlContext context)
          Reset all the token buckets for a controllable.
 void unregisterBWControllable(IBWControlContext context)
          Unregister the bandwidth controllable.
 void updateBWConfigure(IBWControlContext context)
          Update the bandwidth configuration of a controllable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DummyBWControlService

public DummyBWControlService()
Method Detail

getAudioBucket

public ITokenBucket getAudioBucket(IBWControlContext context)
Description copied from interface: IBWControlService
Return the token bucket for audio channel.

Specified by:
getAudioBucket in interface IBWControlService
Parameters:
context - The registry context.
Returns:
Token bucket for audio channel.

getDataBucket

public ITokenBucket getDataBucket(IBWControlContext context)
Description copied from interface: IBWControlService
Return the token bucket for data channel.

Specified by:
getDataBucket in interface IBWControlService
Parameters:
context - The registry context.
Returns:
Token bucket for data channel.

getVideoBucket

public ITokenBucket getVideoBucket(IBWControlContext context)
Description copied from interface: IBWControlService
Return the token bucket for video channel.

Specified by:
getVideoBucket in interface IBWControlService
Parameters:
context - The registry context.
Returns:
Token bucket for video channel.

registerBWControllable

public IBWControlContext registerBWControllable(IBWControllable bc)
Description copied from interface: IBWControlService
Register a bandwidth controllable. The necessary resources will be allocated and assigned to the controllable.

Specified by:
registerBWControllable in interface IBWControlService
Parameters:
bc - The bandwidth controllable.
Returns:
The registry context. It's used in the subsequent calls to controller's method.

resetBuckets

public void resetBuckets(IBWControlContext context)
Description copied from interface: IBWControlService
Reset all the token buckets for a controllable. All the callback will be reset and all blocked threads will be woken up.

Specified by:
resetBuckets in interface IBWControlService
Parameters:
context - The registry context.

unregisterBWControllable

public void unregisterBWControllable(IBWControlContext context)
Description copied from interface: IBWControlService
Unregister the bandwidth controllable. The resources that were allocated will be freed.

Specified by:
unregisterBWControllable in interface IBWControlService
Parameters:
context - The registry context.

updateBWConfigure

public void updateBWConfigure(IBWControlContext context)
Description copied from interface: IBWControlService
Update the bandwidth configuration of a controllable. Each time when the controllable changes the bandwidth config and wants to make the changes take effect, this method should be called.

Specified by:
updateBWConfigure in interface IBWControlService
Parameters:
context - The registry context.

lookupContext

public IBWControlContext lookupContext(IBWControllable bc)
Description copied from interface: IBWControlService
Lookup the registry context according to the controllable.

Specified by:
lookupContext in interface IBWControlService
Parameters:
bc - The bandwidth controllable.
Returns:
The registry context.


Copyright © 2006-2009 The Red5 Project