org.iso.mpeg.mpegj.resource
Class ResourceManager

java.lang.Object
  |
  +--org.iso.mpeg.mpegj.resource.ResourceManager

public class ResourceManager
extends java.lang.Object

The resource manager is used for regulation of performance. The Resource Manager API provides a centralized facility for managing resources. It is a collection of a number of classes and interfaces summarized as follows.


Constructor Summary
ResourceManager()
           
 
Method Summary
 void changeDecoder(ObjectDescriptor ODesc, ESDescriptor esDesc, MPDecoder dec)
          Change decoder on the given Object Descriptor and ESDescriptor The underlying implementation is expected to instantiate, attach and start a decoder similar to establishing a new decoder for a BIFS node.
 MPDecoder[] getAvailableDecoder(DecoderType type)
          Get available decoders given decoder type.
 CapabilityManager getCapabilityManager()
          Returns the CapabilityManager used to retrieve all the capabilities (static, dynamic, profile) of the terminal.
 MPDecoder getDecoder(ObjectDescriptor OD, ESDescriptor ES)
          Get Decoder for the given ObjectDescriptor and ESDescriptor.
 int getDecPriority(MPDecoder dec)
          Get priority of a media elementary stream.
 Renderer getRenderer()
          Get renderer and be ready to add events to renderer.
 void setDecPriority(MPDecoder dec, int priority)
          Override/change priority of a media elementary stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceManager

public ResourceManager()
Method Detail

getCapabilityManager

public CapabilityManager getCapabilityManager()
                                       throws CapabilityManagerNotFoundException
Returns the CapabilityManager used to retrieve all the capabilities (static, dynamic, profile) of the terminal.
Returns:
the CapabilityManager if available
Throws:
CapabilityManagerNotFoundException - Thrown when the CapabilityManager is not available (e.g. it is impossible to retrieve information about CPU load, memory etc.)

setDecPriority

public void setDecPriority(MPDecoder dec,
                           int priority)
                    throws InvalidDecoderPriorityException,
                           DecoderNotFoundException
Override/change priority of a media elementary stream.
Throws:
DecoderNotFoundException - Thrown when the Decoder is not available
InvalidDecoderPriorityException - thrown when the prirority is invalid

getDecPriority

public int getDecPriority(MPDecoder dec)
                   throws DecoderNotFoundException
Get priority of a media elementary stream.
Throws:
DecoderNotFoundException - Thrown when the Decoder is not available

getDecoder

public MPDecoder getDecoder(ObjectDescriptor OD,
                            ESDescriptor ES)
                     throws DecoderNotFoundException,
                            BadNodeException
Get Decoder for the given ObjectDescriptor and ESDescriptor.
Parameters:
ObjectDescriptor -  
ESDescriptor -  
Returns:
MPDecoder
Throws:
DecoderNotFoundException - Thrown when the Decoder is not available
BadNodeException - is thrown when the nodeId does not correspond to a valid node in the scenegraph

getRenderer

public Renderer getRenderer()
                     throws RendererNotFoundException
Get renderer and be ready to add events to renderer.
Throws:
RendererNotFoundException - is thrown if the Renderer is not available

changeDecoder

public void changeDecoder(ObjectDescriptor ODesc,
                          ESDescriptor esDesc,
                          MPDecoder dec)
                   throws DecoderNotFoundException,
                          BadNodeException
Change decoder on the given Object Descriptor and ESDescriptor The underlying implementation is expected to instantiate, attach and start a decoder similar to establishing a new decoder for a BIFS node. All the elementary streams attached to the original decoder is attached to the new decoder.
Parameters:
ObjectDescriptor -  
ESDescriptor -  
MPDecoder -  
Throws:
DecoderNotFoundException - Thrown when the Decoder is not available
BadNodeException - is thrown when the OD does not correspond to a valid node in the scenegraph

getAvailableDecoder

public MPDecoder[] getAvailableDecoder(DecoderType type)
                                throws InvalidDecoderTypeException
Get available decoders given decoder type.
Returns:
returns an array of available decoders that are not used currently.
Throws:
InvalidDecoderTypeException - Thrown when the DecoderType not valid