org.red5.server.stream
Class ProviderService

java.lang.Object
  extended by org.red5.server.stream.ProviderService
All Implemented Interfaces:
IScopeService, IProviderService

public class ProviderService
extends Object
implements IProviderService


Field Summary
 
Fields inherited from interface org.red5.server.stream.IProviderService
BEAN_NAME
 
Constructor Summary
ProviderService()
           
 
Method Summary
 List<String> getBroadcastStreamNames(IScope scope)
          Get names of existing broadcast streams in a scope.
 IMessageInput getLiveProviderInput(IScope scope, String name, boolean needCreate)
          Get a named Live provider as the source of input.
 IMessageInput getProviderInput(IScope scope, String name)
          Get a named provider as the source of input.
 File getVODProviderFile(IScope scope, String name)
          Get a named VOD source file.
 IMessageInput getVODProviderInput(IScope scope, String name)
          Get a named VOD provider as the source of input.
 boolean registerBroadcastStream(IScope scope, String name, IBroadcastStream bs)
          Register a broadcast stream to a scope.
 boolean unregisterBroadcastStream(IScope scope, String name)
          Unregister a broadcast stream of a specific name from a scope.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProviderService

public ProviderService()
Method Detail

getProviderInput

public IMessageInput getProviderInput(IScope scope,
                                      String name)
Get a named provider as the source of input. Live stream first, VOD stream second.

Specified by:
getProviderInput in interface IProviderService
Parameters:
scope - Scope of provider
name - Name of provider
Returns:
null if nothing found.

getLiveProviderInput

public IMessageInput getLiveProviderInput(IScope scope,
                                          String name,
                                          boolean needCreate)
Get a named Live provider as the source of input.

Specified by:
getLiveProviderInput in interface IProviderService
Parameters:
scope - Scope of provider
name - Name of provider
needCreate - Whether there's need to create basic scope if that doesn't exist
Returns:
null if not found.

getVODProviderInput

public IMessageInput getVODProviderInput(IScope scope,
                                         String name)
Get a named VOD provider as the source of input.

Specified by:
getVODProviderInput in interface IProviderService
Parameters:
scope - Scope of provider
name - Name of provider
Returns:
null if not found.

getVODProviderFile

public File getVODProviderFile(IScope scope,
                               String name)
Get a named VOD source file.

Specified by:
getVODProviderFile in interface IProviderService
Parameters:
scope - Scope of provider
name - Name of provider
Returns:
null if not found.

registerBroadcastStream

public boolean registerBroadcastStream(IScope scope,
                                       String name,
                                       IBroadcastStream bs)
Register a broadcast stream to a scope.

Specified by:
registerBroadcastStream in interface IProviderService
Parameters:
scope - Scope
name - Name of stream
bs - Broadcast stream to register
Returns:
true if register successfully.

getBroadcastStreamNames

public List<String> getBroadcastStreamNames(IScope scope)
Get names of existing broadcast streams in a scope.

Specified by:
getBroadcastStreamNames in interface IProviderService
Parameters:
scope - Scope to get stream names from
Returns:
List of stream names

unregisterBroadcastStream

public boolean unregisterBroadcastStream(IScope scope,
                                         String name)
Unregister a broadcast stream of a specific name from a scope.

Specified by:
unregisterBroadcastStream in interface IProviderService
Parameters:
scope - Scope
name - Stream name
Returns:
true if unregister successfully.


Copyright © 2006-2007 the Red5 project.